MS-DOS Python (memory and speed)

Olivier Boulot (olivier@simob.cnet-pab.fr)
Mon, 6 Dec 93 09:52:57 +0100

Bennett Todd <bet@std.sbi.com> writes:

>I want to do some hacking on the MS-DOS Python port.

So do I, in the long term.

>In particular, I have this fantasy: Python, built for an HP-95LX's

Now that's interesting... I plan to use Python on my HP100LX :-)
However, a first stage would be to run it smoothly in a DOS box. Only
later would I try to add support for system-manager (for non-HP Python
hackers: a kind of light-weight character mode GUI used by HP's
palmtops) compliance.

Unfortunately so far, I have not had very much luck. I quite agree with
Mark Anacker <marka@dsinet.dgtl.com>, when he says:

>The biggest problem I ran into was the lack of memory - Python is
>something of a hog (sorry Guido).

But worse yet is speed. I wrote a set of classes to model the HP100LX's
General Data Base files. Unfortunately, it takes all of four seconds to
process the 1000 bytes index of a 20k database :-( And that's on a
25MHz 386 DOS box. It won't even run on the HP100 (memory this time).

Worried that I might have to forget about the idea altogether I went
back to simple things and tried:

for i in range(1000): pass

The loop ran in something under one second on the 25Mhz 386 desktop,
and in... *25* seconds on the HP100! Now I know it's only an XT class
PC, but I used to own a BBC microcomputer (2MHz 6502) which did FOR I=1
TO 10000 : NEXT in 1 second...

This is all the more frustrating that since discovering Python two
weeks ago I have played with quite a lot with it and I like it
*immensely* (I have already praised Guido in private and won't repeat
it here to avoid embarrassing him too much :-)

So what's to be concluded? That Python's implementation is really
workstation oriented (lots of memory and lots of power) and that it is
best forgotten for DOS? Or have there been different reports about
Python's performance on DOS in the past, and I am only a clumsy
newbie?

Liking-Python-a-lot-but-sorry-that-it-performs-so-poorly-on-DOS-ly,

Olivier Boulot France Telecom / CNET olivier.boulot@issy.cnet.fr