compared performances of jit.expr and jit.gen

    Jul 21 2013 | 2:58 pm
    Hi all,
    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 "" 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%.
    Did I miss something? I'm sure I did, but what?

    • Jul 22 2013 | 9:40 am
      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.
    • Jul 22 2013 | 10:12 am
      Hi Emmanuel,
      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.
    • Jul 22 2013 | 6:12 pm
      I believe the extra CPU is the result of better taking advantage of multithreading. That's a good thing.
    • Jul 23 2013 | 6:39 am
      and actually (just to confirm), when I reduce the rate of the qmetro to 20bps, so that jit.expr is able to perform that on time, the opposite appears: jit.gen takes way less CPU than jit.expr.
      Thanks for the clarification,