aboutsummaryrefslogtreecommitdiff
path: root/modules/test-runner.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-02-03 08:13:01 -0600
committerCraig Jennings <c@cjennings.net>2026-02-03 08:13:01 -0600
commitfd946298c51d9546261effdbac92f46ca5d6b2c4 (patch)
treeb4b1cf82b435e0d0b30cf12ba4ee9c47b43be4d7 /modules/test-runner.el
parentef8f13751967d5b577cb9d98b87870daee9f9940 (diff)
downloaddotemacs-fd946298c51d9546261effdbac92f46ca5d6b2c4.tar.gz
dotemacs-fd946298c51d9546261effdbac92f46ca5d6b2c4.zip
perf(lorem-optimum): fix O(n²) tokenization algorithm
The tokenizer was creating substring copies on every iteration: - (substring text pos (1+ pos)) for whitespace check - (substring text pos) for regex matching - copies ALL remaining text This caused 10K word tokenization to take 727ms instead of 6ms. Fix: Use string-match with start position parameter and check characters directly with aref instead of creating substrings. Performance improvement: - Tokenize 10K words: 727ms → 6ms (120x faster) - Learn 10K words: 873ms → 15ms (59x faster) - Learn 100K words: 70s → 208ms (341x faster)
Diffstat (limited to 'modules/test-runner.el')
0 files changed, 0 insertions, 0 deletions