[Tutor] python, speed, game programming

Steven D'Aprano steve at pearwood.info
Sat Jan 4 10:14:23 CET 2014


On Fri, Jan 03, 2014 at 02:11:21PM -0800, Devin Jeanpierre wrote:
> On Fri, Jan 3, 2014 at 1:53 PM, Keith Winston <keithwins at gmail.com> wrote:
> > I am gearing up for the next project (yeah, an eventual end to Chutes &
> > Ladders!). It is a typing tutor, I am inclined to use it to learn Dvorak but
> > I would expect it easily adapted to QWERTY or anything else.
[...]
> Modern computers are just so absurdly fast that the overhead Python
> has compared to other languages just doesn't matter for the kind of
> work you are doing. If you typed at a hundred characters per second
> Python could still keep up, unless there's something about your
> problem you aren't describing.

While I agree with Devin, it is possible to write absurdly slow code in 
*any* language. This is why is is better to write straightforward, 
simple code in preference to complicated, intricate code -- it is easier 
to understand simple code, which means it is easier to work out which 
bits are bottlenecks and do something about them. Then, only if it turns 
out the code is too slow, do you add complexity to speed it up.


-- 
Steven


More information about the Tutor mailing list