Short answer: no.
Longer answer: NodeBox uses the Cocoa drawing API (Quartz), which is hardware-accelerated. However, all mathematical functions happen on the CPU. Also, the main loop of your animation runs in Python.
Using the GPU for these calculations would require you to write custom vertex or fragment shaders, which would result in a totally different project.
With regards to your problem, don't focus to hard on these mini-optimizations; instead try to look at the big picture and see how you can optimize that. As an example, if you use sinus/cosinus a lot, you could use lookup tables to cache the computations. Profiling your code helps a lot to find the bottlenecks.
http://docs.python.org/lib/module-profile.html
Kind regards,
Frederik
hello frederik,
could you post a dummy example on how to profile a NB script.? this could be very useful.
I've tried to use the profile module without real success.
thanks
giorgio
GPU powered numeric functions?
Posted by toby_ on May 27, 2008Is it possible to execute functions like sinus / cos or just
counting loops on the GPU?
Because right now all this is made by the CPU i guess.
So if i want to move a square - the cpu has to push up a
numeric parameter and the GPU just changes the picture?
Or is it possible to tell the GPU to do this by it self?