Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Right shift VS Divide and floor 2
(version: 0)
Comparing performance of:
Right shift vs Divide and floor vs Divide and floor 2
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var arr = new Array(10000).fill(0).map(() => Math.random() * 10);
Tests:
Right shift
arr.map(n => n >> 1);
Divide and floor
arr.map(n => Math.floor(n / 2));
Divide and floor 2
arr.map(n => ~~(n / 2));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Right shift
Divide and floor
Divide and floor 2
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:
Array.Sort vs Math.Min-Max
Fisher-Yates Shuffle
find index range in array111
Set.has v.s Array.includes
yoooooo
Comments
Confirm delete:
Do you really want to delete benchmark?