upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorDominik <55330408+Dom-in@users.noreply.github.com>2026-11-22 12:48:15 +0000
committerDominik <55330408+Dom-in@users.noreply.github.com>2026-11-22 12:48:15 +0000
commitaedd73ba37ea980bb1142b0de03edb770f7e7499 (patch)
tree5f2bb52fdcffe745f23fc8ccd4c0096e585b981f /runtime/src/pe_loader.cpp
parent41f448261e1de8a410b4d760e69a7e5656cef858 (diff)
shader_ir: precompile operand patterns and take plain registers first
operand() runs once per operand of every instruction of every shader. It called re.fullmatch with string patterns (a cache lookup each time), and a plain register like v3 or s12, the commonest operand, only matched after failing neg(...), abs(...) and sext(...). - The 11 patterns are compiled once at module level (the same regex text). - A token that is a single register (s or v, then digits) returns the same dict _REG builds, before the neg/abs/sext forms it can't match. parse_line over the 2,512 lines of tests/semantic/fixtures/disasm: identical output on every line and on 34 edge tokens; 12.9 -> 8.6 us per line (34% faster). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions