Re: ANN: CLPython
- From: "Willem Broekema" <metawilm@xxxxxxxxx>
- Date: 6 Jul 2006 00:45:24 -0700
Hey Ken,
Ken Tilton wrote:
Congrats on the release. Do Python programs run as native-compiled code
or interpreted by a CL Python interpreter?
Thanks. It's all compiled to native code. A reason is that information
about e.g. variable scopes is stored in "environments" using a private
declaration type (declare (pydecl ...) ..) and those declarations are
only taken into account if the code is compiled, therefore compilation
is required before execution.
And of course compilation is for efficiency. Besides the normal work
the compiler does, there are compiler macros that save allocations of
temporary intermediate objects (e.g. bound methods) and inline of
common cases, so execution time is reduced.
Currently the execution speed varies from being on par with CPython for
numerical stuff (e.g. file b2.py from parrotbench, which in fact means
Allegro's and Python's arithmetic are about equally fast), to being up
to 3 or 4 times slower for highly "dynamic" code (in particular lots of
attribute and methods lookups, like in file b0.py). All in all not bad,
but of course we'd like to improve efficiency.
Just make sure you can run this code:
http://pyworks.org/svn/pycells/
Sure, if you promise not to use C modules...
- Willem
.
- References:
- ANN: CLPython
- From: Willem Broekema
- Re: ANN: CLPython
- From: Ken Tilton
- ANN: CLPython
- Prev by Date: Re: ANN: CLPython
- Next by Date: Re: efficiently accumulating values
- Previous by thread: Re: ANN: CLPython
- Next by thread: Re: Reflections on a classic Lisp Paper
- Index(es):
Relevant Pages
|