Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
NEW VS CACHED
(version: 1)
Comparing performance of:
CACHED vs NEW
Created:
8 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var tab = []; function cached(){ tab[0] = Math.random(); tab[1] = Math.random(); tab[2] = Math.random(); tab[3] = Math.random(); } function neww(){ return [ Math.random(), Math.random(), Math.random(), Math.random() ]; }
Tests:
CACHED
for (var i = 0; i < 100; i++) { cached(); }
NEW
for (var i = 0; i < 100; i++) { neww(); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
CACHED
NEW
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Cache global vs reference
For vs Min
For vs Min1
Array.find vs. Map.get fork
Comments
Confirm delete:
Do you really want to delete benchmark?