local vs global regex performance in js functions (version: 0)
Do regular expressions become faster in javascript, when we put them in the global scope, or doesn't it matter when we declare them directly in a function?
Comparing performance of: regex directly in function vs regex in global scope
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 directly in function
regex in global scope
Fastest:N/A
Slowest:N/A
ⓘGet performance results from real users on your website with Request Metrics.
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one to run it!