Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Mathjs evaluation
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Native
176.8 Ops/sec
Mathjs compile
5.0 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/12.2.0/math.min.js"></script>
Script Preparation code:
var func1 = (x, y, z) => x*x + y*y + z*z; var expr2 = math.parse('x^2 + y^2 + z^2').compile() var func2 = (x, y, z) => expr2.evaluate({x, y, z})
Tests:
Native
const out = [] for (let x = 0; x < 100; x += 1) { for (let y = 0; y < 100; y += 1) { for (let z = 0; z < 100; z += 1) { out.push(func1(x, y, z)) } } }
Mathjs compile
const out = [] for (let x = 0; x < 100; x += 1) { for (let y = 0; y < 100; y += 1) { for (let z = 0; z < 100; z += 1) { out.push(func2(x, y, z)) } } }