Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster readRegexp #13453

Merged
merged 5 commits into from Jun 10, 2021
Merged

Faster readRegexp #13453

merged 5 commits into from Jun 10, 2021

Commits on Jun 10, 2021

  1. Copy the full SHA
    8723af9 View commit details
    Browse the repository at this point in the history
  2. chore: add benchmark

    JLHwung committed Jun 10, 2021
    Copy the full SHA
    9515e0b View commit details
    Browse the repository at this point in the history
  3. perf: use charCodeAt

    baseline 256-size RegExp literal : 66124 ops/sec ±8.34% (0.015ms)
    baseline 512-size RegExp literal : 43351 ops/sec ±1.05% (0.023ms)
    baseline 1024-size RegExp literal : 24620 ops/sec ±0.34% (0.041ms)
    baseline 2048-size RegExp literal : 12957 ops/sec ±0.2% (0.077ms)
    current 256-size RegExp literal : 151662 ops/sec ±12.21% (0.007ms)
    current 512-size RegExp literal : 113828 ops/sec ±0.37% (0.009ms)
    current 1024-size RegExp literal : 67246 ops/sec ±1.95% (0.015ms)
    current 2048-size RegExp literal : 35645 ops/sec ±1.69% (0.028ms)
    JLHwung committed Jun 10, 2021
    Copy the full SHA
    636b0bf View commit details
    Browse the repository at this point in the history
  4. perf: update pos to state on finishing regex token

    baseline 256-size RegExp literal : 142419 ops/sec ±14.37% (0.007ms)
    baseline 512-size RegExp literal : 110003 ops/sec ±0.95% (0.009ms)
    baseline 1024-size RegExp literal : 69509 ops/sec ±0.68% (0.014ms)
    baseline 2048-size RegExp literal : 36217 ops/sec ±4.63% (0.028ms)
    current 256-size RegExp literal : 166167 ops/sec ±1.04% (0.006ms)
    current 512-size RegExp literal : 120889 ops/sec ±1.25% (0.008ms)
    current 1024-size RegExp literal : 76181 ops/sec ±1.46% (0.013ms)
    current 2048-size RegExp literal : 44898 ops/sec ±1.25% (0.022ms)
    JLHwung committed Jun 10, 2021
    Copy the full SHA
    0f2b924 View commit details
    Browse the repository at this point in the history
  5. perf: compare charcode on valid_regex_flags

    baseline 256 small regexp literal with all flags: 4342 ops/sec ±1.57% (0.23ms)
    baseline 512 small regexp literal with all flags: 2213 ops/sec ±1.51% (0.452ms)
    baseline 1024 small regexp literal with all flags: 1144 ops/sec ±0.22% (0.874ms)
    baseline 2048 small regexp literal with all flags: 541 ops/sec ±1.12% (1.849ms)
    current 256 small regexp literal with all flags: 4643 ops/sec ±1.3% (0.215ms)
    current 512 small regexp literal with all flags: 2355 ops/sec ±1.14% (0.425ms)
    current 1024 small regexp literal with all flags: 1176 ops/sec ±0.87% (0.85ms)
    current 2048 small regexp literal with all flags: 553 ops/sec ±1.31% (1.807ms)
    JLHwung committed Jun 10, 2021
    Copy the full SHA
    f377065 View commit details
    Browse the repository at this point in the history