3 ms·
I'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: Hit
by lvh 9y ago
I'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.