If you include null / undefined values in your test (which is half of the check, here) it seems like a wash. In both Chrome and Safari it’s within the error bounds of test (which probably underestimate actual variance) and on Safari the optimized version is slower (though still within error). http://jsperf.com/this-is-for-mbostock/2