Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Time Cost for different calling
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15
Browser:
Safari 17
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
test1
224695664.0 Ops/sec
test2
642253.5 Ops/sec
test3
11387613.0 Ops/sec
HTML Preparation code:
<script> function fn1() { const a = new Object(); a.val1 = 1; a.val2 = 2; a.f0 = () => a.val1 + a.val2; return a; } function fn2() { const a = new Function(); a.val1 = 1; a.val2 = 2; a.f0 = () => a.val1 + a.val2; return a; } const f0 = function() { console.log(this.val1 + this.val2); }; function fn3() { const a = {}; let f1 = f0.bind(a); a.val1 = 1; a.val2 = 2; return f1; } class BB { get name() { return 'hi' } } const BBp = BB.prototype; BBp.val1 = 1; BBp.val2 = 2; function fn4() { const a = () => {}; Object.setPrototypeOf(a, BBp); return a; } function fn5() { const a = () => {}; a.prototype = BBp; return a; } let m = new Float64Array(256); function fn6() { const a = {}; a.b = m.subarray(0, 64); return a; } function fn7() { const a = {}; Object.defineProperty(a, 'b', {get: ()=> m.subarray(0, 64)}) return a; } </script>
Tests:
test1
fn1();fn1();fn1();fn1();fn1();fn1();fn1();fn1();fn1();fn1();
test2
fn2();fn2();fn2();fn2();fn2();fn2();fn2();fn2();fn2();fn2();
test3
fn3();fn3();fn3();fn3();fn3();fn3();fn3();fn3();fn3();fn3();
test4
fn4();fn4();fn4();fn4();fn4();fn4();fn4();fn4();fn4();fn4();
test5
fn5();fn5();fn5();fn5();fn5();fn5();fn5();fn5();fn5();fn5();
test6
fn6();fn6();fn6();fn6();fn6();fn6();fn6();fn6();fn6();fn6();
test7
fn7();fn7();fn7();fn7();fn7();fn7();fn7();fn7();fn7();fn7();