Mathematica 7 compares to other languages

Jon Harrop jon at ffconsultancy.com
Tue Dec 9 21:05:47 EST 2008


Xah Lee wrote:
> On Dec 8, 5:25 pm, Terry Reedy <tjre... at udel.edu> wrote:
>> Lest anyone doubt that problem size is important for comparing program
>> run times, consider ...
> 
> just in case there's any doubt:
> 
> Simply change these lines in Jon's program:
> 
> Main[9, 512, 4] to Main[9, 512, 4.]
> 
> and it will run faster.

Only for trivial input and not for the challenge you were given.

> Also, change this line:
> 
>  Block[{scene = Create[level, {0, -1, 4}, 1]},
> 
> to
> 
>  Block[{scene = Create[level, {0., -1., 4.}, 1.]},

Same again.

> will make it faster further. (both of which are in my version. The
> “Block” can be replaced with “With”.)

That code is evaluated once to build the scene. There is no point in
optimizing it.

> As i said, this error in a Mathematica code in the context of speed is
> a major blunder. His denial makes him a stubborn moron.

That performance issue only affects trivial problems and, in particular,
does not affect the problem you were trying to solve.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u



More information about the Python-list mailing list