3 ms·
Huh. No tailcall optimization? Then I don't understand something and have to recheck. I just wrote a Redis REPL (wire protocol) parser using recursion. Being s
by specialist 9y ago
Huh. No tailcall optimization? Then I don't understand something and have to recheck.
I just wrote a Redis REPL (wire protocol) parser using recursion. Being so simple, I wasn't worried about stack depth. But while stepping thru with WebStorm's debugger, I noticed the tailcalls were (apparently) being eliminated. An unexpected surprise.
Using nodejs 6.11.1, npm 3.10.10.
- dvlsg 9y agoYeah, tail call optimization has been in since node 6, I believe. _Maybe_ behind a v8 flag. https://bugs.chromium.org/p/v8/issues/detail?id=4698 https://bugs.chromium.org/p/v8/issues/detail?id=4698
- eric_bullington 9y agoIt's behind a flag now, but they're eliminating it, so it will not be released.