3 ms·
> I hope it's not difficult to see why a change that directly impacts that might have negative consequences elsewhere. Sure, but at the risk of repeating myse
by geocar 9y ago
> I hope it's not difficult to see why a change that directly impacts that might have negative consequences elsewhere.
Sure, but at the risk of repeating myself: That sounds like an implementation problem.
> I've heard no argument why the PTC mode should be intrinsically faster than the non-PTC mode
There's a simple one: Hitting the stack less means you hit less memory.
> The people you are disagreeing with (not I) are responsible about 85% of the JavaScript engines on the Internet, an incredibly competitive space with billions in funding. ... I'm sure they'd love a patch
Happy to oblige. I'll implement TCO on V8 for a billion dollars in a way that beats these benchmarks.
> However, you're asking me to prove a negative.
And you're making straw men instead: At the beginning of your response, it's not even clear you read my complaint, but at the end, it's quite clear.
The simple answer would probably have been "yes, it's about an implementation, but it remains unknown where else we can go", but instead you doubled down...
- lvh 9y agoI'll repeat myself: it is not an implementation problem that a compliant implementation needs to do necessarily more work. You say: > there's a simple one: Hitting the stack less means you hit less memory. But I explicitly acknowledge this in my comment: > (yes; you elide a stack frame at the cost of a whole-function analysis pass -- heuristically, "stack frame" isn't the expensive one of the two) (Completely ignoring that there are already plenty of optimizations where a compliant interpreter may avoid the stack frame already anyway, so it's not even true that PTC must be faster for that reason.) You keep picking on V8, but remember that there is so far only 1 major JS implementation that managed to do this without impact. It would seem that it's more probable that it's the other way around: it's an implementation detail that JSC had it easy. > And you're making straw men instead: At the beginning of your response, it's not even clear you read my complaint, but at the end, it's quite clear. I'd be happy to address this point, but I genuinely don't know which straw man I've supposedly built.
- geocar 9y ago> > > I've heard no argument why the PTC mode should be intrinsically faster than the non-PTC mode > > there's a simple one: Hitting the stack less means you hit less memory. > But I explicitly acknowledge this in my comment! Not really sure what your point is. If you agree that's an argument as to why tail-call elimination should be intrinsically faster, I'm not sure why you'd say it isn't. I can't shake this feeling you think you're having a very different argument than I am. > remember that there is so far only 1 major JS implementation that managed to do this without impact. Which for some reason you think means this isn't an implementation issue.
- lvh 9y ago> But I explicitly acknowledge this in my comment! I did not put an exclamation mark there, but a colon, pointing out the specific reason why PTC can end up slower.