Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Sqrt vs Alpha max plus beta min algorithm
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 132
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Math.sqrt()
8439.4 Ops/sec
Alpha max plus beta min
13471.1 Ops/sec
Tests:
Math.sqrt()
const RAD_PER_DEG = Math.PI / 180; for(let i = 0; i < 360; i += 0.1) { const r = i * RAD_PER_DEG; const x = Math.sin(r); const y = -Math.cos(r); const s = Math.sqrt(x * x + y * y); }
Alpha max plus beta min
const ALPHA = 0.96043387010342; const BETA = 0.397824734759316; const RAD_PER_DEG = Math.PI / 180; for(let i = 0; i < 360; i += 0.1) { const r = i * RAD_PER_DEG; const x = Math.abs(Math.sin(r)); const y = Math.abs(-Math.cos(r)); const h = x > y ? ALPHA*x + BETA*y : ALPHA*y + BETA*x; }