UPBGE-logicnodes icon indicating copy to clipboard operation
UPBGE-logicnodes copied to clipboard

compile nodegroup to cython - nuitka - etc and test for speed increases

Open BluePrintRandom opened this issue 5 years ago • 4 comments
trafficstars

if anyone gets the time,

can we compile nodegroup to cython - nuitka - etc and test for speed increases?

thanks.

BluePrintRandom avatar May 14 '20 07:05 BluePrintRandom

First I'd need to understand how the logic bricks themselves work, I'm currently getting into blender source code, but it's quite a beast, after all

In general, cython would seem more stable and up-to-date than nuitka

IzaZed avatar May 14 '20 07:05 IzaZed

it looks like to get the best perfs you need to use CTypes module and Cython

BluePrintRandom avatar May 23 '20 05:05 BluePrintRandom

https://cai.tools.sap/blog/how-to-speed-up-python-with-c/

          Time       Memory Used
Python   47.30 s    3 177 024 ko
Ctypes    0.45 s      795 084 ko
Cython    0.42 s      792 976 ko
CFFI      0.47 s      795 292 ko

BluePrintRandom avatar May 23 '20 05:05 BluePrintRandom

Oh wow, this doesn't really seem optional anymore My old man is quite the crack when it comes to python and C/C++, I'll get him on board to take a look at this with me

IzaZed avatar May 23 '20 10:05 IzaZed