summaryrefslogtreecommitdiff
path: root/docs/genrelnotes.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-10-17 10:42:32 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-12-08 10:08:10 -0800
commit4ef1866dba127a9c12f4c475d3bbb6aaac97a243 (patch)
tree87c930b0b907b5f0c024fb2e4485f3b6c4ddd0f5 /docs/genrelnotes.py
parent908e85b326ff161273f079a4f4fa3dfd207ced9c (diff)
downloadmeson-4ef1866dba127a9c12f4c475d3bbb6aaac97a243.tar.gz
mparser: lexer: reduce regular expression usage
Match single-character tokens a separate dictionary lookup. As pointed out by dcbaker, this is even faster than str.index and gives the syntax error check for free (via KeyError). It also enables splitting the special-case "if" in two parts, one for long tokens and one for short tokens, thus providing further speedup. This shaves about 2/3rds of the time spent in lex(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/genrelnotes.py')
0 files changed, 0 insertions, 0 deletions