A Faster Language? (Was Re: Prolog is "faster" than C)

michael k finegan mfinegan at uceng.UC.EDU
Sun Jun 17 07:02:46 AEST 1990


m100-2ai at WEB.berkeley.edu writes:

>Hello world.

>There have been a lot of talks lately on the net about PROLOG being
>faster than C (and a lot of counter-arguments as well).  However, the
>basic question which troubles me is that of comparing the speed of
>2 programming languages.  Is it really "correct" to say that one
>programming language is faster than the other?  Doesn't that really
>depend on the compiler, but not the language itself?

One aspect that is language dependent - array access. Pointer manipulation
in C, but recursion or tree traversal in Prolog. Any examples of code where
a list gets frequently accessed in the middle, but the Prolog version is
'faster' than the C version ? Probably not (with Clocksin & Mellish syntax).
While recursion could be removed by the compiler, would it figure out that
a linear sequence of elements was appropriate ?

					- Michael Finegan
					  mfinegan at uceng.UC.EDU



More information about the Comp.lang.c mailing list