Another approach to this test: https://www.measurethat.net/Benchmarks/Show/3444/0/switch-vs-object-literal
Compares performance of using a 'switch' statement vs object functions and object properties
Now regex flies and split crawls. BTW that regex match split plus join is what jQuery's removeClass() does - just much worse. Had to double check just in case that there's some hidden trick involved.
unshift vs concat vs spread of another array
test
Using spread operator vs mutating accumulator in reduce loop
New benchmark Your benchmarks
Source code: GitHub/MeasureThat.net
Report issues: MeasureThat.net/Issues
Based on: Benchmark.js (v2.1.1)
Facebook page: https://www.facebook.com/MeasureThat.Net