Timeline for Faster regex to match all worded numbers from 1 to 99
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 25 at 6:10 | comment | added | Bobby234 | To detail it, yours is faster on PCRE2, but not with Javascript (test on jsfiddle might be useful) | |
Sep 24 at 21:18 | comment | added | Bobby234 | I just tested it. Using the benchmark feature both mine and yours have a minimum of 32ms match time. Multiply the string magnitude if your machine is too fast. Despite yours having -20% steps than mine on PCRE2 flavour, i don't see a difference even with jsfiddle. | |
Sep 24 at 12:50 | comment | added | Rogue | "For some reason": I wonder if the nearly-alphabetical sorting of the words helped the regex engine build a pseudo-trie. E.g. there's a lot of t-words, followed by f-words, and s-words, and so on. | |
S Sep 23 at 20:28 | review | First answers | |||
Sep 23 at 20:32 | |||||
S Sep 23 at 20:28 | history | answered | Jdm | CC BY-SA 4.0 |