Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137
Windows
Desktop
25 days ago
Test name Executions per second
Negative 1105535.1 Ops/sec
Lazy (non-greedy) 1138304.8 Ops/sec
Script Preparation code:
AخA
 
/* André Antunes da Cunha - hello world! */
var negative = /<[^>]*>/g;
var lazy = /<.*?>/g;
var input =
    "hello <01> hello <02> hello <03> hello <04> hello <05> hello <06> hello <07> hello <08> hello <09> hello <10> " +
    "hello <11> hello <12> hello <13> hello <14> hello <15> hello <16> hello <17> hello <18> hello <19> hello <20> " +
    "hello";
Tests:
  • Negative

     
    [...input.matchAll(negative)]; /* Array.from(input.matchAll(negative)); */
  • Lazy (non-greedy)

     
    [...input.matchAll(lazy)]; /* Array.from(input.matchAll(lazy)); */