a set
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
function isStandardAttributeRegExp(name){
return /^(get|set|value|writable|enumerable|configurable)$/.test(name);
}
var std = ['get', 'set', 'value', 'writable', 'enumerable', 'configurable']
function isStandardAttributeArray(name){
return std.indexOf(name) !== -1;
}
var set = new Set(['get', 'set', 'value', 'writable', 'enumerable', 'configurable'])
function isStandardAttributeSet(name){
return !set.has(name);
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
regexp |
|
pending… |
array |
|
pending… |
set |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by David Bruant
- Revision 2: published by David Bruant
0 comments