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.