Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
eval vs new Function vs mathjs
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/119.0.6045.169 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 119
Operating system:
iOS 17.1
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
eval
5803726.5 Ops/sec
new Function
19663238.0 Ops/sec
mathjs
443005.4 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/6.6.1/math.min.js"></script>
Script Preparation code:
var func = new Function("return 2 * 3");
Tests:
eval
eval("2 * 3");
new Function
func();
mathjs
math.evaluate("2 * 3");