Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:59:45+00:00 2026-05-28T01:59:45+00:00

When comparing this benchmark with chrome 16 vs opera 11.6 we find that in

  • 0

When comparing this benchmark with chrome 16 vs opera 11.6 we find that

  • in chrome native bind is almost 5 times slower then an emulated version of bind
  • in opera native bind is almost 4 times faster then an emulated version of bind

Where an emulated version of bind in this case is

var emulatebind = function (f, context) {
    return function () {
        f.apply(context, arguments);
    };
};

Are there good reasons why there is such a difference or is this just a matter of v8 not optimizing enough?

Note: that emulatebind only implements a subset but that isn’t really relevant. If you have a fully featured and optimised emulated bind the performance difference in the benchmark still exists.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:59:45+00:00Added an answer on May 28, 2026 at 1:59 am

    Based on http://jsperf.com/bind-vs-emulate/6, which adds the es5-shim version for comparison, it looks like the culprit is the extra branch and instanceof that the bound version has to perform to test if it’s being called as a constructor.

    Each time the bound version is run, the code that gets executed is essentially:

    if (this instanceof bound) {
        // Never reached, but the `instanceof` check and branch presumably has a cost
    } else {
        return target.apply(
         that,
         args.concat(slice.call(arguments))
        );
    
        // args is [] in your case.
        // So the cost is:
        // * Converting (empty) Arguments object to (empty) array.
        // * Concating two empty arrays.
    }
    

    In the V8 source code, this check appears (inside boundFunction) as

    if (%_IsConstructCall()) {
        return %NewObjectFromBound(boundFunction);
    }
    

    (Plaintext link to v8natives.js for when Google Code Search dies.)

    It is a bit puzzling that, for Chrome 16 at least, the es5-shim version is still faster than the native version. And that other browsers have rather varying results for es5-shim vs. native. Speculation: maybe %_IsConstructCall() is even slower than this instanceof bound, perhaps due to crossing native/JS code boundaries. And perhaps other browsers have a much faster way of checking for a [[Construct]] call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried comparing this to examples and I just can't seem to find out
The problem is this: I have multiple competing threads (100+) that need to access
Background While running benchmark tests this morning, my colleagues and I discovered some strange
What Tanimoto comparison algorithm is exactly doing? How can we use this for comparing
I've got the next problem up from this one: Comparing date ranges The solution
Updated: This question contains an error which makes the benchmark meaningless. I will attempt
I've had some problems using timeit() as an accurate benchmark when comparing longer (>
I remember stumbling upon a benchmark comparing jQuery vs GQuery (run time selectors) vs
JDK 1.7.0 XMLUnit 1.3 When comparing this control XML string: String controlXml = +
Compiling this lines long int sz; char tmpret[128]; //take substring of c, translate in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.