You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further in Node 8.3+ we won't be punished for exposing the arguments object to other functions
This seems too strong a conclusion to be supported by bench/arguments.js's
function leakyArguments () {
return other(arguments)
}
In the past, f.apply(o, arguments) was special cased. But to avoid arguments arrayification, there was the additional requirement that the call site be monomorphic - that there was no diversity in function shape (normal, strict, bound, arrow, etc).
This one benchmark case explores passing arguments to a named inlineable function.
Any conclusions broader than that seem unsupported. The inlining may be required, or the named-ness, or the monomorphism. And given the historical "fragility" of avoiding arguments arrayification, there may be additional requirements. Examining source, or authoritative guidance, or more extensive tests, seem needed to support the current conclusion.
The text was updated successfully, but these errors were encountered:
@mncharity thanks for reporting! Would you like to provide some counter examples were arguments is getting slower again?
As a side note: arrow functions do not have arguments, and the usage of apply with mixed normal/strict mode is probably not common. I check the bound case and I can confirm the same behavior.
This seems too strong a conclusion to be supported by
bench/arguments.js
'sIn the past,
f.apply(o, arguments)
was special cased. But to avoidarguments
arrayification, there was the additional requirement that the call site be monomorphic - that there was no diversity in function shape (normal, strict, bound, arrow, etc).This one benchmark case explores passing
arguments
to a named inlineable function.Any conclusions broader than that seem unsupported. The inlining may be required, or the named-ness, or the monomorphism. And given the historical "fragility" of avoiding
arguments
arrayification, there may be additional requirements. Examining source, or authoritative guidance, or more extensive tests, seem needed to support the current conclusion.The text was updated successfully, but these errors were encountered: