Re: off-topic: Why is lisp so weird?

From: Dan Tex1 (dantex1_at_aol.com)
Date: 03/04/04


Date: 04 Mar 2004 01:54:30 GMT

From: CBFalconer cbfalconer@yahoo.com

>Dan Tex1 wrote:
>>
>... snip ...
>>
>> Bottom line... the speed of the hardware is largely irrelevant.
>> Given the same algorithm written in different languages and
>> compiled and run on the EXACT same machine... which executable
>> runs faster. That is the ONLY meaningful test. And... it is
>> a serperate and different test for each piece of hardware ( and
>> OS ) you choose to run the test on.
>
>No it isn't. You also have to include the data on which it is
>operating. This is why the O() notation is important. An O(N)
>application will always run faster than an equivalent O(N*N)
>application, _for a large enough N_. It may well be slower for
>some N below a certain threshold. The only effect of hardware
>speed is to move that threshold value.

Your talking different algorithms now aren't you? N versus N^2. I already
said that you must compare the SAME algorithm in order to derive any meaning
from a speed test. Likewise, though I didn't specifically state it ( maybe I
should have ), you must speed test with the exact same data sets.
Otherwise... you're not doing a totally fair comparison.

My whole point is:
Use two different languages
Use the exact same algorithm ( or as close as possible )
Use the same Operating system
Use the EXACT same machine even
( I don't mean an identical machine, I mean the SAME machine )
And... use the SAME test data

If you violate any of the above... your speed testing results are
questionable.
Even if you do all of the above... you still haven't factored in the results
of creating the executables in the two languages using compilers, etc. from
different vendors.

For instance, I've noted how many web sites there are where someone publishes
speed test results from different languages where they used the best, most
optimizing and up-to-data compiler for their language of choice and then uses
some old, defunct compiler for the language that they are comparing against.
Often... the compiler used for the language they don't like is never even
mentioned. If that isn't a hint that some bias exist, I don't know what is.

Dan :-)



Relevant Pages

  • Re: Best intro language?
    ... compilation phase is one of the things that has attracted me to scheme, ... from other "scripting" languages. ... is the algorithm and design. ... So an implementation with a compiler ...
    (comp.lang.scheme)
  • Re: Whats the point of bool?
    ... hardware where individual bits can easily be addressed, ... versus the added complexity for compiler writers and programmers? ... It's the same reason languages distinguish between integers and ...
    (comp.lang.c)
  • Re: Microcontroller Project
    ... As far as languages are concerned, ... A C compiler will just mask the nonsense underneath. ... hardware is the name of the game with uCs. ...
    (sci.electronics.design)
  • Re: Whats the point of bool?
    ... hardware where individual bits can easily be addressed, ... from having a type thats essentially an alias for int at the hardware ... versus the added complexity for compiler writers and programmers? ... Okay, at the risk of going off topic, what strongly-typed languages ...
    (comp.lang.c)
  • Translating an embedded C algorithm
    ... development (hardware and software). ... different programming languages that are available for embedded ... implemented in other languages. ... is interested in translating the algorithm into Ada. ...
    (comp.lang.ada)

Loading