Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
controllo velocità conversione byte
(version: 0)
...
Comparing performance of:
prova 1 vs prova 2 vs prova 3
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
let x = 132
Tests:
prova 1
let s = (x >>> 0).toString(2); if ( x > 0 && s.substr(3,1) == '0' && s.substr(4,1) == '0' && s.substr(7,1) == '0' ) { return s; }
prova 2
if ( x > 0 && (x & 8) == 0 && (x & 16) == 0 && (x & 128) == 0 ){ return (x >>> 0).toString(2); }
prova 3
if ( x > 0 && (x & Math.pow(2,3) == 0 && (x & Math.pow(2,4)) == 0 && (x & Math.pow(2,7)) == 0 ){ return (x >>> 0).toString(2); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
prova 1
prova 2
prova 3
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!
Comments
Confirm delete:
Do you really want to delete benchmark?