type-inference-performance
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var array_of_ints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var array_of_strings = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
var array_of_mixed = [1, '2', '3', 4, 5, '6', '7', '8', 9, '10']
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
array of ints |
|
pending… |
array of ints with type conversion to int |
|
pending… |
array of mixed with type conversion to int |
|
pending… |
array of strings |
|
pending… |
array of mixed with type coercion to string |
|
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 DrSlump
- Revision 2: published
- Revision 3: published
- Revision 4: published
- Revision 5: published
- Revision 6: published by Tony
- Revision 7: published by Igor Santos
- Revision 8: published
- Revision 9: published
- Revision 11: published
- Revision 12: published
- Revision 13: published
- Revision 14: published by sss0791
- Revision 15: published
0 comments