Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Modulo Alternatives
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15
Browser:
Safari 18
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
11 months ago
Benchmark engine:
Benchmark.js
Alternate Modulo #1
646.8M/s
Standard Modulo
610.3M/s
View exact numbers
Test name
Executions per second
✓
Alternate Modulo #1
646,807,296 Ops/sec
Standard Modulo
610,256,768 Ops/sec
Script Preparation code:
function modulo(dividend, divisor){ while (dividend >= divisor){ dividend -= divisor; } return dividend; }
Tests:
Standard Modulo
var remainder = 400 % 360;
Alternate Modulo #1
var remainder = modulo(400, 360);