Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
多态参数函数 vs 固定类型参数函数 性能测试
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/143.0.0.0 Safari/537.36 Edg/143.0.0.0
Browser:
Chrome 143
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
4 months ago
Test name
Executions per second
多态
221.1 Ops/sec
固定
704.4 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const string3 = '3'; const number3 = 3; const add = (a,b) => { return a+b; }
Tests:
多态
for (let i=0; i < 1e5; i++) { const a = Math.random(); const b= Math.random(); const d = Math.random(); add(a,b); add(string3,d); }
固定
for (let i=0; i < 1e5; i++) { const a = Math.random(); const b= Math.random(); const d = Math.random(); add(a,b); add(number3,d); }