I have a (probably dumb) question regarding the performances of jit.gen as compared to jit.expr: each time I translate a code from expr to gen, I notice (on my computer at least) a significant degradation of the performances.
As an example, I started from the patch "bench.compare.expr.maxpat" provided with the distribution, which indeed shows (using cpuclock) a significant advantage for jit.gen. From this patch, I made two new ones, with a way bigger matrix (1500x1500):
. The patch with jit.expr:
. the patch with git.gen:
The patch with jit.expr takes approx 190% CPU on my machine (Macbook pro i7 4x2.3 GHz, OS 10.8.4, Max 6.1.3), whereas the patch with jit.gen takes more than 450%.
On my machine (i5 2.5GHz), i get 270% of CPU for jit.gen and 145% for jit.expr. Using jit.fpsgui, I see above 50 frames per second for jit.gen and barely 12 frames per seconds for jit.expr. So more cpu used, which result in more frames calculated per seconds.
Thanks for the answer, I knew I was missing something :).
OK, this makes totally sense: jit.expr is slower and has a lower cpu limit than jit.gen. So it takes indeed less cpu than jit.gen if we ask him too much, but does not process as fast as it should do. Whereas jit.gen does the job without slowing down the framerate, and even if it's way more efficient, it asks of course more cpu for that.