Skip to content

Instantly share code, notes, and snippets.

@conartist6
Created March 23, 2026 23:01
Show Gist options
  • Select an option

  • Save conartist6/051838025af1e04d966e03aa95147b7e to your computer and use it in GitHub Desktop.

Select an option

Save conartist6/051838025af1e04d966e03aa95147b7e to your computer and use it in GitHub Desktop.
@bablr/regex benchmark
import { re } from '@bablr/boot';
import { generateMatches } from '@bablr/regex-vm';
let input = '5'.repeat(10000000);
console.time();
let matches = [];
for (let match of generateMatches(re`/\d+\s+/g`, input)) {
matches.push([...match[0]]);
}
console.timeEnd();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment