Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
fib test
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/138.0.0.0 Safari/537.36 Edg/138.0.0.0
Browser:
Chrome 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
better?
47.2M/s
loop
19.8M/s
View exact numbers
Test name
Executions per second
✓
better?
47,203,452 Ops/sec
loop
19,791,720 Ops/sec
Tests:
loop
function fibonacci(num){ var a = 1, b = 0, temp; while (num >= 0){ temp = a; a = a + b; b = temp; num--; } return b; } fibonacci(20);
better?
function fibonacci(n) { return Math.round( (Math.pow((1 + Math.sqrt(5)) / 2, n) - Math.pow(-2 / (1 + Math.sqrt(5)), n)) / Math.sqrt(5) ); } fibonacci(20);