Nathan Braswell
|
d420b6491f
|
Fix regression - was using the wrong error when blocking recursion and treating as real error instead of stop recursion fallback
|
2022-04-25 09:19:14 -04:00 |
|
Nathan Braswell
|
223147f699
|
Initial inlining working - fib_let went from .4 something to .138. Suspect the remaining slowdown over fib is extra refcounting calls, but unsure. Compile error on fib_manual, need to see whether it was this change or the earlier find fixes
|
2022-04-25 09:07:42 -04:00 |
|
Nathan Braswell
|
18250e716f
|
Ah, the remaining calls were to =. Added 'inlining' the = and comp_helper loop into repeated calls to comp_helper_helper, eliminating the param array overhead. Now fib only allocates 10 times (instead of 4 million), and runs in .107s, finally beating Python handilly and becoming about 2x as slow as Chez. Feels like a decent spot for now, and that was most all of the low hanging fruit. The only thing left now is inlining of user functions to get fib_let performing as well - it looks glacial now at .4s because of the 2 remaining closure calls that the let expands to
|
2022-04-21 01:09:10 -04:00 |
|
Nathan Braswell
|
0cb52eb0b4
|
Add inlining of add and subtract, and now might be beating Python, though not by a statistically significant amount with the number of tests. Fib is still allocating 4 million times or so, which is weird, since +&- should have been the last calls to do so. Time to track that down
|
2022-04-20 23:47:36 -04:00 |
|
Nathan Braswell
|
5cdaafebe2
|
Change lapply to optionally take in an explicit env, make it optional for vapply so they match, then tweak Y such that it threads the dynamic env through, then implement eta-reduction in the compiler backend. This provides about the same speedup again from the Y elimination, as it's kinda the other half for fully getting rid of Y such that there's just static recursive calls. fib.kp went from 1.7 -> 1.1 -> 0.5, and fib_let similarly. fib.kp is now faster than fib_manual, but just by a bit.
|
2022-04-17 01:52:01 -04:00 |
|