[clpython-devel] Status?

Willem Broekema metawilm at gmail.com
Wed Jan 16 20:30:21 UTC 2008


On Jan 16, 2008 5:48 PM, Rudolf <omouse at gmail.com> wrote:
> Do you know if benchmarks have been done comparing the speed of CLPython to
> CPython?

For numerical stuff, there shouldn't be too much difference. Creating
instances and doing lots of attribute lookup is not as efficient in
CLPython yet, though. Here is Pystone, to give an indication of the
latter:

clpython(19): (repl)
[CLPython -- type `:q' to quit, `:help' for help]
>>> import sys
#<module sys (package "clpython.module.sys" with 36 external symbols)
@ #x1096c602>
>>> sys.path.append("./test/")
None
>>> import pystone
;;; Compiling file test/pystone.py
;;; Warning: Module `pystone', function `Proc8': unused variable `IntGlob'.
;;; Warning: Module `pystone', function `Proc5': unused variable `Char1Glob'.
;;; Warning: Module `pystone', function `Proc5': unused variable `BoolGlob'.
;;; Warning: Module `pystone', function `Proc4': unused variable `Char2Glob'.
;;; Warning: Module `pystone', function `Proc3': unused variable `IntGlob'.
;;; Warning: Module `pystone', function `Proc0': unused variable `i'.
;;; Warning: Module `pystone', function `Proc0': unused variable `PtrGlbNext'.
;;; Warning: Module `pystone', function `Proc0': unused variable `PtrGlb'.
;;; Warning: Module `pystone', function `Proc0': unused variable `BoolGlob'.
;;; Writing fasl file
/Users/willem/.fasl/allegro-8.1m-macosx-x86/Users/willem/dev/lisp/python/test/pystone.fasl
;;; Fasl write complete
; Fast loading /Users/willem/.fasl/allegro-8.1m-macosx-x86/Users/willem/dev/lisp/python/test/pystone.fasl
#<module `pystone' from file #P"test/pystone.py" @ #x10e07f02>
>>> pystone.main()
starttime 11.74
tmp 11.76
nulltime 0.020000458
Pystone(1.1) time for 50000 passes = 4.089999
This machine benchmarks at 12224.94126973949     pystones/second
finished
None
>>>

While CPython gives:

Banaan:~/dev/lisp/python/test willem$ python2.5
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pystone
>>> pystone.main()
starttime 0.06
tmp 0.07
nulltime 0.01
Pystone(1.1) time for 50000 passes = 1.21
This machine benchmarks at 41322.3 pystones/second
finished

- Willem



More information about the Clpython-devel mailing list