Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
is_array, is_string
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Browser:
Firefox 124
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
is_array
1965.6M/s
is_string
1957.3M/s
View exact numbers
Test name
Executions per second
✓
is_array
1,965,609,600 Ops/sec
is_string
1,957,260,032 Ops/sec
Script Preparation code:
var array = ["H", "E", "L", "L", "O", "."]; var string = "Hello."; function is_array(array){ if(array.constructor === Array){ return true; } return false; } function is_string(string){ if(typeof string === "string"){ return true; } return false; }
Tests:
is_array
is_array(string);
is_string
is_string(string);