Re: [PyOpenGL-Users] numpy/Numeric vs. numarray with glDrawPixels
Brought to you by:
mcfletch
From: Toon V. <Too...@UG...> - 2005-04-01 07:08:31
|
Tim Hirzel wrote: > This > is all running inside wxPython and the looping is occuring through calls > from OnIdle. In both cases, this works nicely, but interestingly, the > framerate in the numarray version is 30 fps (the max allowed from the > video frame source) while the exact same code using Numeric runs at 15 > fps. I find this strange because otherwise, I have found Numeric to be > faster than numarray. Numarray is optimized for large array operations, while Numeric has a smaller overhead when working with 'small' arrays. (e.g. rotation matrices etc.) From http://www.stsci.edu/resources/software_hardware/numarray: "numarray is efficient for large arrays (>20,000 elements) but is slower than Numeric for small arrays by a factor of 2 to 4." |