Performance in embeded / extended python

Erno Kuusela erno-news at erno.iki.fi
Wed Jul 4 23:57:22 EDT 2001


In article <3b431024.15341289 at news.iway.fr>,
emmanuel.astier at winwise.fr (Emmanuel Astier) writes:

| Hi, 
| I embedded and extended python for a game, and I was REALLY
| disappointed by the performances I get...

| Every frame of my game ( should be 60 time by second ) I call my
| Python logical part from my C game with :
[...]

|     for i in range ( 0, NbTestSprites - 1 ):
|         ListOfSprites[i].setPos( 100, 100 )

| ie it sets the pos of 200 sprites.

[...]

| This is _REALLY_ slow ( i run at around 1 Frame / second on a P733 ).

the python-imposed overhead of doing that certainly should not slow
that down to running only one complete loop per second unless setPos()
is a python function and does something fairly complicated. perhaps
you are looking in the wrong place for the slowdown?

  -- erno





More information about the Python-list mailing list