pyirrlicht - python ctypes binding
I have already received such criticism a month ago here http://sourceforge.net/projects/pir/for ... ic/4526104 and I repeat my answer here: I totally agree with her. The only question is who can do the job quickly? I do not have enough time now to do so, perhaps in future something will change.
Regarding C++ parser: it always exists in the project, h2ctypes.py (C++ -> py helper generator), h2bi.py (FreeBASIC wraper generator).
Regarding the PyPy: the results of my tests
Collision.py and ctypes version pyirrlicht
Intel Pentium Dual-Core CPU T4300 2.1GHz (without SSE2, if I understand correctly)
Windows 7 64-bit
pypy-1.5.0a0-win32: FPS 55-125; memory usage ~70mb
Python 2.6.6: FPS 145-175; memory usage ~20mb
Not compatibility with official ctypes module, not understand ctypes constructions and always give me this message "RuntimeWarning: C function without declared return type called".
PyPy have very big size, libpypy.dll - 23 424 000 bytes.
It would be interesting to see the results of tests with a CPU with SSE2.
Regarding C++ parser: it always exists in the project, h2ctypes.py (C++ -> py helper generator), h2bi.py (FreeBASIC wraper generator).
Regarding the PyPy: the results of my tests
Collision.py and ctypes version pyirrlicht
Intel Pentium Dual-Core CPU T4300 2.1GHz (without SSE2, if I understand correctly)
Windows 7 64-bit
pypy-1.5.0a0-win32: FPS 55-125; memory usage ~70mb
Python 2.6.6: FPS 145-175; memory usage ~20mb
Not compatibility with official ctypes module, not understand ctypes constructions and always give me this message "RuntimeWarning: C function without declared return type called".
PyPy have very big size, libpypy.dll - 23 424 000 bytes.
It would be interesting to see the results of tests with a CPU with SSE2.
yep, it consumes more memory - a tradeoff for better performance. There is some benchmark data for you:
using benchmark from http://blog.dhananjaynene.com/2008/07/p ... by-groovy/
(data from that site)
c++: 3 microseconds per iteration
CPython 2.5.1: 192 microseconds per iteration
CPython 2.5.1 with psyco: 33 microseconds per iteration
(my own tests)
CPython 2.6: 142 microseconds per iteration
PyPy: 5 microseconds per iteration
pretty good increase in performance i should say.
I didnt notice parser, thanks for info. ill try playing with it in my spare time
using benchmark from http://blog.dhananjaynene.com/2008/07/p ... by-groovy/
(data from that site)
c++: 3 microseconds per iteration
CPython 2.5.1: 192 microseconds per iteration
CPython 2.5.1 with psyco: 33 microseconds per iteration
(my own tests)
CPython 2.6: 142 microseconds per iteration
PyPy: 5 microseconds per iteration
pretty good increase in performance i should say.
I didnt notice parser, thanks for info. ill try playing with it in my spare time
With psyco must be very careful, sometimes it has the opposite effect. If you want the accelerator, look at http://code.google.com/p/shedskin/. I think the maximum speed will be with your own Python to C++ helper converter.
i put in psyco just as an example, its not maintained any more and developer joined pypy. thing with shedskin is that it does not allow to use full power of python, where pypy does allow that. also pypy has its own shedskin-like translator that can compile rpython (restricted python, rules much like of shedskin) apps to native executables. if interested you can read http://www.rfk.id.au/blog/entry/compili ... -programs/
if there is something lacking, you can always add the necessary, as this is an open source project.roxaz wrote:thing with shedskin is that it does not allow to use full power of python, where pypy does allow that.
Thanks, but I'm more interested in my own pyirrlicht to Irrlicht C++ helper converter.roxaz wrote:also pypy has its own shedskin-like translator that can compile rpython (restricted python, rules much like of shedskin) apps to native executables. if interested you can read http://www.rfk.id.au/blog/entry/compili ... -programs/
Re: pyirrlicht - python ctypes binding
game builder 0.5
added C++ game source
added C++ game source
Re: pyirrlicht - python ctypes binding
http://shanto.ru/gb/en/gb_faq.html - small FAQ for Game Builder
Re: pyirrlicht - python ctypes binding
Have you tried Cython for binding C++ classes? I noticed it's faster and more maintainable. I was actually thinking of making Python wrapper using Cython from scratch. Let me know if you are interested.
IRC: #irrlicht on irc.freenode.net
Github: https://github.com/danyalzia
Homepage: http://danyalzia.com
Github: https://github.com/danyalzia
Homepage: http://danyalzia.com
Re: pyirrlicht - python ctypes binding
please see your private messages
Re: pyirrlicht - python ctypes binding
wrapping entire lib manually will take forever. maybe you should look at shiboken. it is wrapper generator for PySide (python wrapper for Qt). Now Qt is big and complex lib meaning that shiboken works. i pastebin'ed my little experiment that generates some wrappers. did not get to building ant testing yet though.
http://pastebin.com/0mT15hJs
http://pastebin.com/XAY6d3XH
http://pastebin.com/0mT15hJs
http://pastebin.com/XAY6d3XH