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.
Comparing performance of: Regex vs Regex match as Split - jQuery style :-) vs Split and Join
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Regex
Regex match as Split - jQuery style :-)
Split and Join
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36