Re:Show HN: Fast.js – faster reimplementations of native Jav...
by _greim_ on Tuesday June 24, 2014 @03:07PM
(#7939811)
Would tail call optimization help in this case? AFAIK JS's iteration methods aren't recursive.
[ Parent
| on HN ]
Re:Show HN: Fast.js – faster reimplementations of native Jav...
by warfangle on Tuesday June 24, 2014 @05:09PM
(#7940666)
Tail call optimization isn't just for recursive tail call optimization (though that is the most common scenario!).
It simply refers to 'unrolling' that function call, so a new function doesn't need to be added to the stack.
JS's iteration methods aren't currently recursive, at least in V8[0]. But that's probably due to lack of TCO!