Python compilers?

Carl Banks imbosol at aerojockey.invalid
Sat May 22 01:54:24 EDT 2004


Paul Rubin wrote:
> Carl Banks <imbosol at aerojockey.invalid> writes:
>> If I recall, + can work on ints, floats, bignums, rationals, and
>> complex numbers, at least.  What one instruction does + compile to
>> here?
> 
> Lisp supports type declarations which advise the compiler in those
> situations.  A few such proposals have been made for Python, but none
> have taken off so far.

Yes, that's been established.  There's two questions remaining for me:

1. These claims that Lisp code can approach 50 percent the speed of C,
   is that with or without the optional type declarations?

2. If you don't use the declarations, does compiling Lisp help?  If it
   does (and nothing I've read indicated that is doesn't), it
   definitely casts some doubt on the claim that compiling Python
   wouldn't help.  That's kind of been my point all along.

I think (and I'm wrapping this up, cause I think I made my point)
compiling Python could help, even without type declarations, but
probably not as much as in Lisp.  It could still make inferences or
educated guesses, like Lisp compilers do; just maybe not as often.


-- 
CARL BANKS                      http://www.aerojockey.com/software
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work." 
          -- Parody of Mr. T from a Robert Smigel Cartoon



More information about the Python-list mailing list