Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
filter vs filter(boolean)
(version: 1)
Comparing performance of:
filter vs filter(boolean)
Created:
6 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var data = [{}, {}, {e:1}, {d: 'ed'}, null, {}, {}, {e: {}}, {e: {r: null}}, undefined, {}, null, null, undefined, {f: null}, null];
Tests:
filter
/*When writing async/deferred tests, use `deferred.resolve()` to mark test as done*/ data.filter(item => item !== null)
filter(boolean)
data.filter(Boolean)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
filter
filter(boolean)
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser/OS:
Chrome 142 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
filter
38594052.0 Ops/sec
filter(boolean)
25718506.0 Ops/sec
Comments
Confirm delete:
Do you really want to delete benchmark?