Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Math.ceil vs floor vs ~~
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Math.floor(test) + 1 (CEIL)
153.5M/s
Math.ceil(test)
150.6M/s
~~test
146.5M/s
Math.floor(test)
141.3M/s
FAST CEIL
139.6M/s
View exact numbers
Test name
Executions per second
✓
Math.floor(test) + 1 (CEIL)
153,521,136 Ops/sec
Math.ceil(test)
150,627,520 Ops/sec
~~test
146,539,712 Ops/sec
Math.floor(test)
141,326,416 Ops/sec
FAST CEIL
139,591,920 Ops/sec
Script Preparation code:
var test = 190.4;
Tests:
Math.ceil(test)
Math.ceil(test)
~~test
~~test
Math.floor(test)
Math.floor(test)
Math.floor(test) + 1 (CEIL)
Math.floor(test) + 1
FAST CEIL
~~test + 1