Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS > exec vs matchAll vs match
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Browser:
Chrome 144
Operating system:
Windows
Device Platform:
Desktop
Date tested:
3 months ago
Test name
Executions per second
1111
30817886.0 Ops/sec
2222
24201756.0 Ops/sec
3333
2714295.0 Ops/sec
Tests:
1111
const TAG_REGEX = /(\w+)/g; const dirtyHtml = 'aqui é uma <strong class="elm">questão</strong> de teste <img class="elm" onerror="opa"></img><br class="elm"/><iframe src="http://" class="iframeclass"/><iframe src="http://" class="iframeclass"/><iframe src="http://" class="iframeclass"/>'; TAG_REGEX.exec(dirtyHtml)
2222
const TAG_REGEX = /(\w+)/g; const dirtyHtml = 'aqui é uma <strong class="elm">questão</strong> de teste <img class="elm" onerror="opa"></img><br class="elm"/><iframe src="http://" class="iframeclass"/><iframe src="http://" class="iframeclass"/><iframe src="http://" class="iframeclass"/>'; dirtyHtml.matchAll(TAG_REGEX)
3333
const TAG_REGEX = /(\w+)/g; const dirtyHtml = 'aqui é uma <strong class="elm">questão</strong> de teste <img class="elm" onerror="opa"></img><br class="elm"/><iframe src="http://" class="iframeclass"/><iframe src="http://" class="iframeclass"/><iframe src="http://" class="iframeclass"/>'; dirtyHtml.match(TAG_REGEX)