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

Dan KoGai dankg at headcrash.Berkeley.EDU
Sun Jun 17 12:57:40 AEST 1990


In article <5184 at uceng.UC.EDU> mfinegan at uceng.UC.EDU (michael k finegan) writes:
>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 ?
>

	But I think recursion is more dependent on machine architecture
than programming language.  Heavily recursive function like tak() should
be a dog for register-window machines like Sparc.  And recursion is usually
more for programmer's convenience than speed and we usually avoid recursive
function when speed is priority.
	For me a good (compiler) language is the one that meets the following
criteria:

1:	Simplicity
2:	Flexibility
3:	Intimatacy to object codes

	Those 3 looks contradicting each other:  Usually simple language
is not very flexible: Flexible language is too complicated:  Simple and
Flexibile language often makes unexpected object code.  And IMHO C is the
most balanced language I know:  It's simple, flexible, and very intimate
to object code.
	C is really computer language:  Friendly syntax is second priority.
It's never intended to be AI language or language for human's sake:  It's
a language for computer's sake.

----------------
____  __  __    + Dan The "Segmentation Fault" Man
    ||__||__|   + E-mail:       dankg at ocf.berkeley.edu
____| ______    + Voice:        +1 415-549-6111
|     |__|__|   + USnail:       1730 Laloma Berkeley, CA 94709 U.S.A
|___  |__|__|   +
    |____|____  + "Unix is not insecure. It's people who are"
  \_|    |      + "Unix doesn't have pain.  It's people who do"



More information about the Comp.lang.c mailing list