PyOgre vs Ogre Speed
- Clay
- OGRE Community Helper
- Posts: 518
- Joined: Wed Mar 17, 2004 4:14 am
- Contact:
PyOgre vs Ogre Speed
This is Ogre:
This is PyOgre:
Neat huh? Pretty close FPS. I am running PyOgre through a JITer and it jumps the framerate up to fairly close to what you can achieve with C++ code (minus the JITer it's about ~20FPS lower).
Of course this will be different when a large amount of game logic is done in python, but since you can rewrite any python code in C++ and call it natively from python, you can spot-optimize code by profiling for time consuming parts and rewrite the code in a faster language.
This is also using a direct line-by-line translation of C++ code into python code, which is not the fastest way of doing things. You can accomplish higher speeds in python if write things in a pythonic way instead of a C++ way. I'm thinking about playing with the sample framework and writing it so that it plays nicer with python.
This is PyOgre:
Neat huh? Pretty close FPS. I am running PyOgre through a JITer and it jumps the framerate up to fairly close to what you can achieve with C++ code (minus the JITer it's about ~20FPS lower).
Of course this will be different when a large amount of game logic is done in python, but since you can rewrite any python code in C++ and call it natively from python, you can spot-optimize code by profiling for time consuming parts and rewrite the code in a faster language.
This is also using a direct line-by-line translation of C++ code into python code, which is not the fastest way of doing things. You can accomplish higher speeds in python if write things in a pythonic way instead of a C++ way. I'm thinking about playing with the sample framework and writing it so that it plays nicer with python.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- bana
- Greenskin
- Posts: 132
- Joined: Mon Aug 02, 2004 7:40 am
- Location: Austin, Texas
- Contact:
- temas
- OGRE Retired Team Member
- Posts: 390
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: The Woodlands, TX
- Contact:
-
- Kobold
- Posts: 37
- Joined: Sun Jan 26, 2003 1:17 am
- Location: France (Paris)
Psyco is really an impressive JIter. Though, the terrain demo is hardly a stress test, since all it does in python is driving the collision query and keyboard input.
In the flagdemo, were I animate a mesh in real-time (compute the position of 400 vertexes, their normal and setting them in the vertex buffer one by one in python), I get about 70 FPS with psyco and 30 FPS without pysco. This is a serious performance boost ! (for record, without doing all this expensive tasks, FPS is about 560 FPS).
--tisba
In the flagdemo, were I animate a mesh in real-time (compute the position of 400 vertexes, their normal and setting them in the vertex buffer one by one in python), I get about 70 FPS with psyco and 30 FPS without pysco. This is a serious performance boost ! (for record, without doing all this expensive tasks, FPS is about 560 FPS).
--tisba
-
- Gnoblar
- Posts: 6
- Joined: Wed Mar 23, 2005 2:57 pm
Python Source Code
Looks wonderful,
Any chance of posting the full python source code?
Or, sending the full python source code to me?
Andre Mikulec
Andre_Mikulec@Hotmail.com
Any chance of posting the full python source code?
Or, sending the full python source code to me?
Andre Mikulec
Andre_Mikulec@Hotmail.com
AIM
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
PyOgre is publically available in the ogreaddons cvs module.
- Clay
- OGRE Community Helper
- Posts: 518
- Joined: Wed Mar 17, 2004 4:14 am
- Contact:
- fog
- Greenskin
- Posts: 149
- Joined: Sun Sep 19, 2004 6:00 pm
- Location: Torino, ITALY
- Contact:
It compiles and run up to displaying the configuration interface, then crashes randomly in the boost library (that I learned to hate.) The build chain is not trivial (you'll need gcc >= 3.4, gccxml and boost.python and ogre recompiled from scratch) but if you manage to build any help in debugging is very welcome.Dalfy wrote:What are the requierement of the PyOgre Bindings currently ?
Does it work under Linux ?