Language Niches (long)

Courageous jkraska1 at san.rr.com
Mon Jul 30 04:38:40 EDT 2001


>> Why would anyone ever write anything in C or other standard compiled
>> languages? 
>
>I'm not sure you were serious here, but I'll answer anyway:
>Because it runs quickly and you have very good control of memory.

I was being ironic; shame on me for not being more clear. The irony
is that the Python interpreter itself is written in C, as well as large numbers
of its objects. The finally-honed implementation of Python's dictionary,
for example, depends critically on being written in C. Tight inner loops
in almost all Python applications are governed by how much time its
dictionary is consuming.

>E.g. a student here has been working on a program which needs to store a 
>small amount of information for a half-billion objects -- easy in C to 
>allocate a byte per object in a big array, harder if each object has 
>multiple bytes of overhead.  Of course most other languages will let you 
>allocate byte arrays but then you lose their object oriented advantages.
>And, the program currently runs in around 16 hours -- imagine how much more 
>time it might take if written in an interpreted language.

16 hours? Woozies.

C//




More information about the Python-list mailing list