Python in game development?
Tim Rowe
digitig at cix.co.uk
Sat Jul 22 16:28:00 EDT 2000
In article <39781665.24F4C5B8 at prescod.net>, paul at prescod.net (Paul
Prescod) wrote:
> Sean Wilson wrote:
> >
> > Hi,
> >
> > > From a game programming perspective, you can probably consider
> > > Python to
> > > be dirt-slow, though. The trade-off is a lot of power for speed, but
> > > that power can help you gain back speed because you can be a lot
> > > smarter.
> >
> > Before I started trying to write my own scripted language I tried to
> > find
> > some tutorials and articles on them but couldn't get them anywhere.
> > Someone
> > directed me towards python but I couldn't find anything about the
> > virtual
> > machine it uses. How does it work and why is it so slow?
>
> I think by now Martijn wishes he had spoken more clearly. Python is only
> slow compared to assembly language and C. It is quite reasonable in
> performance compared to other scripting languages!!!
>
> Python may be slower than your language because it has more
> sophisticated flow control. In particular, Python's function calling and
> name lookups are very flexible and not as efficient as in less flexible
> languages.
To put the same thing another way, there tends to be a tradeoff between
development time and execution time. Python stacks things heavily in
favour of development time, assembler and C stack things heavily in favour
of execution time. Until somebody makes a radical breakthrough the
tradeoff is inevitable, which is why Python is not really in competition
with C, C++, C#, Ada, assembler, etc. It is more in competition with
things like Perl and BASIC (though frankly I don't see it as much of a
competition!).
I say a tradeoff is inevitable. Of course, it /is/ possible for a language
to stack things /against/ both development time and run time. But I won't
name names ... :-)
More information about the Python-list
mailing list