freeze vs seal vs normal
JavaScript performance comparison
Preparation code
<script>
var o = {
i: 42,
s: "someString",
n: null,
r: /ocd/,
a: [1,2,3],
f: function(i) { return i; }
}
var seal = Object.seal(o);
var frozen = Object.freeze(o);
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
seal |
|
pending… |
frozen |
|
pending… |
normal |
|
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 foreach vs each
- Revision 2: published
- Revision 3: published by Jimb Esser
- Revision 4: published by vincent piel
- Revision 5: published
- Revision 6: published by mthq
- Revision 7: published by mthq
0 comments