precompile

Benchmark created on


Setup

const re = /\W/g
const str = 'kjkl3jkl3jkl4jkl23jkl23dc87&*(^&%^&3^&%^^&DCHJKSAJKHd)'

Test runner

Ready to run.

Testing in
TestOps/sec
no pre
str.replace(/\W/g, '')
ready
pre
str.replace(re, '')
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.