You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we get the JIT to completely remove the overhead of lazy seqs? I'll be looking into this before the 0.2 release. I'd like to see: (reduce + 0 (map inc (map dec (range 10)))) basically compile down to a loop. I know transducers could be used to do this, and they are already fast, but it'd be nice to get the JIT to allocation removal for seqs as well.
I've done some work on this, and it seems that the "run once" semantics of lazy seqs make the JIT really unhappy. We may just have to tell the JIT to stop tracing whenever it hits a lazy seq function. This will improve performance a bit (about 20% in my tests), but doesn't really get to the goal I would like to hit, but I'm not even sure that's possible. I'll ask on the PyPy mailing list to see if anyone has ideas.
Activity
halgari commentedon Mar 17, 2015
I've done some work on this, and it seems that the "run once" semantics of lazy seqs make the JIT really unhappy. We may just have to tell the JIT to stop tracing whenever it hits a lazy seq function. This will improve performance a bit (about 20% in my tests), but doesn't really get to the goal I would like to hit, but I'm not even sure that's possible. I'll ask on the PyPy mailing list to see if anyone has ideas.
halgari commentedon May 1, 2015
Something else I'm considering is to have map produce vectors vs lazy seqs. Will benchmark this a bit.