On 6/9/12 2:11 AM, Brandon Benvie wrote:
Part of the slowdown is because builtin bind has to handle construct as
well. But yeah, V8's bind is *notably* slow when you do a comparison of
either a full manual implementation of bind semantics yourself, or
compared to say Spidermonkey. I'm not sure what the deal is there, but
it *is* a V8 issue in some way or another.

For reference, this is the V8 bind code:
https://github.com/joyent/node/blob/master/deps/v8/src/v8natives.js#L1578

I was just reading up on `bind` versus closure performance. More discussion on all that `bind` does that a closure doesn't do here:

http://stackoverflow.com/questions/8656106/why-is-function-prototype-bind-slow

--
Alan - @bigeasy

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to