Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
function typeof benchmark
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Linux
Device Platform:
Desktop
Date tested:
10 months ago
Test name
Executions per second
split typeof
50717.2 Ops/sec
typeof
49371.6 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function do_not_optimize(v) { $._ = v; } const $ = { _: null, __() { return console.log($._); } }; function A({x,y}) { do_not_optimize( x ? x : do_not_optimize(y)); } function B({x}) { do_not_optimize(typeof x =="string" ? x : do_not_optimize(x)); }
Tests:
split typeof
let c = 1000; while (c--){ A({y: () => "hi"}) A({y:() => "hi"}) A({x:"hi"}) }
typeof
let c = 1000; while (c--){ B({x: () => "hi"}) B({x:() => "hi"}) B({x:"hi"}) }