Python in game development?
Christian Tanzer
tanzer at swing.co.at
Wed Aug 30 02:41:05 EDT 2000
Daniel Berlin <dan at cgsoftware.com> wrote:
> > Now that optimization is obvious. My point is that Python favors
> > optimization much more than some of the other languages you
> > benchmarked (C the most obvious case, I don't know about Forth).
>
> The part i love is where I make a 1 line modification to your optimized
> version (1 to 1.0) so we use floats, and change python to use
> recfib(1476), and we still get the same fast results.
> (1476 is the best you can do without it just saying "inf").
To be honest, it takes twice as long.
Why not changing 1 to 1L instead of 1.0? Then you can do better than
1476 (10000 takes just a bit more than one second, 10001 gives a `Maximum
recursion depth exceeded' runtime error).
Now do that in C.
--
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list
mailing list