Re:Three JavaScript performance fundamentals that make Blueb...
by samth on Monday September 05, 2016 @09:11PM
(#12433110)
Proving that identity isn't needed here is easy: if the function is only used in a first-order way (ie, it's always called) then the identity can't possibly matter. That should work in most cases that matter.
[ Parent
| on HN ]
Re:Three JavaScript performance fundamentals that make Blueb...
by pizlonator on Monday September 05, 2016 @09:23PM
(#12433140)
You're right, it's easy in strict mode. I hadn't realized this before!
In sloppy mode, there's function.arguments. You can walk the stack to find the damned function instance.
Re:Three JavaScript performance fundamentals that make Blueb...
by samth on Wednesday September 07, 2016 @10:22PM
(#12449777)
In that case, the only identity has to come via function.arguments. Could you therefore allocate the identity lazily, since there's nothing else to compare to?
Re:Three JavaScript performance fundamentals that make Blueb...
by pizlonator on Sunday September 11, 2016 @01:50AM
(#12472164)
Yes, you could. I want to implement this eventually.