I'm not sure the solution here is the fastest available, just writing a jsperf to check.