Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Multiplying lists of vectors - with or without declaration
(version: 0)
Comparing performance of:
with duplicate declaration vs without duplicate declaration vs t3
Created:
9 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var N = 100000; var vectors = []; v1 = "prep"; for (var i = 0, li=N; i < li; ++i) { vectors.push( {x:Math.random(), y:Math.random(), z:Math.random()} ); }
Tests:
with duplicate declaration
var vector; v2="case 1"; for (var i = 0, li=vectors.length; i < li; ++i) { vector = vectors[i]; vector.x = 2 * vector.x; vector.y = 2 * vector.y; vector.z = 2 * vector.z; }
without duplicate declaration
v3 = "test 2"; for (var i = 0, li=vectors.length; i < li; ++i) { vector = vectors[i]; vector.x = 2 * vector.x; vector.y = 2 * vector.y; vector.z = 2 * vector.z; }
t3
v3 = "test 2"; for (var i = 0, li=vectors.length; i < li; ++i) { var vector = vectors[i]; vector.x = 2 * vector.x; vector.y = 2 * vector.y; vector.z = 2 * vector.z; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
with duplicate declaration
without duplicate declaration
t3
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:
JavaScript spread operator vs Slice/Splice performance testing
JavaScript spread vs slice vs for
JavaScript spread operator vs Slice/Splice performance, passing
JavaScript spread operator vs Slice/Splice performance 2
JavaScript spread operator vs Slice/Splice performance 2edas
Comments
Confirm delete:
Do you really want to delete benchmark?