[Tutor] python, speed, game programming
Keith Winston
keithwins at gmail.com
Sat Jan 4 02:38:47 CET 2014
Just to be clear, what I'm asking this typing tutor to do is vastly more
than normal, albeit still not seemingly very much. In most programs, they
give you a sentence or paragraph to type, and then time how long it takes.
I'm talking about timing every keypress, and modifying the text stream
based on that. The thing that put me on edge was noticing that my simple
Chutes & Ladders game doesn't go ANY faster on a machine that benchmarks
perhaps 1000 times faster than another...
Keith
On Fri, Jan 3, 2014 at 8:17 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:
> On 03/01/14 21:53, Keith Winston wrote:
>
> 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.
>> ...
>>
>>
>> My concern is with speed. This will have to keep up with (somewhat
>> arbitrarily) fast typing,
>>
>
> Lets see. The speed record for touch typing is around 150 wpm with average
> word being about 5 chars, so a speed of about 750 cpm
> or 12.5cps That's about 80ms between letters.
>
> Python on a modern PC can probably execute around 100k lines
> of code(*) per second or 100 per millisecond. That's 8k lines
> executed between each keypress for the worlds fastest typist.
>
> I used to use a typing tutor that was written in old GW Basic
> on the original IBM PC (speed 4.7MHz) and it had no problem
> analyzing my stats (albeit at a modest 40-50 wpm).
>
> I'd worry about speed after you find you need to.
>
> (*)Caveat: I haven't tried any kind of objective test and
> of course some Python 'lines' are equal to many
> lines of simpler languages - think list comprehensions.
> But in practice I still don't think you will have a
> big problem.
>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.flickr.com/photos/alangauldphotos
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
--
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140103/ccc4d6cb/attachment.html>
More information about the Tutor
mailing list