|
|
|
|
|
by tomatsu
3124 days ago
|
|
Is it actually any faster? Let's see... https://jsperf.com/trimcall/1 For me, the "clever" one is slightly faster in Chrome while the supposedly naive one is significantly faster in Firefox. Looks like the naive approach not only wins in terms of readability, but performance, too. (Unless I seriously screwed this up which is always a possibility with micro benchmarks.) |
|