Boolean filter (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
let array = [0, 1, false, 2, '', 3, null, 'a', undefined, NaN, 'b'];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Boolean upcast
array.filter(Boolean);
ready
Double false operator
array.filter(value => !!value)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.