map.has VS in operator
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var desc = {
get: function(){},
configurable: true
}
var descMap = new Map();
for(var p in desc){
descMap.set(p, desc[p])
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
in operator |
|
pending… |
map.has |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments