jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
http://stackoverflow.com/q/4502967/117068
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="original">
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
<div timestamp="99">t99</div>
<div timestamp="999">t999</div>
<div timestamp="12">t12</div>
<div timestamp="11">t11</div>
<div timestamp="10">t10</div>
<div timestamp="9">t9</div>
<div timestamp="8">t8</div>
<div timestamp="7">t7</div>
<div timestamp="6">t6</div>
<div timestamp="5">t5</div>
<div timestamp="4">t4</div>
<div timestamp="3">t3</div>
<div timestamp="2">t2</div>
<div timestamp="1">t1</div>
<div timestamp="9999">t9999</div>
</div>
<h1>Results</h1>
<div id="results"></div>
Ready to run.
Test | Ops/sec | |
---|---|---|
Original Idea |
| ready |
Array of hashes |
| ready |
Native attribute access similar to original |
| ready |
Original (no parseInt) |
| ready |
Native (no parseInt) |
| ready |
Test sort |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.