TCO is one of the ES6 proposals, and the proposal requires calls in "proper tail position" to get TCO'd.
There is a benchmark here:
Hi, in here is a discussion about how TCO makes possible to use constant stack space, so is important in the view of memory consumption.
I have seen often extracts that look like the following:
Do these count as "proper tail position"?
(In reply to David Rajchenbach Teller [:Yoric] from comment #2)
> I have seen often extracts that look like the following:
> Do these count as "proper tail position"?
No, that's not a proper tail position, because it wouldn't be ok to just return whatever `foo()` returns. That extract must always return `undefined`.
*** Bug 960532 has been marked as a duplicate of this bug. ***
WebKit is apparently the first widely used ES engine that supports proper tail call elimination:
https://bugs.chromium.org/p/v8/issues/detail?id=4698 Chrome also is done.