Commit e349950
perf: inline Source access in parser hot paths
Replace the Parser delegation layer (self._current, self.inc(),
self.mark(), self.extract(), self.end()) with direct access to the
Source object (src = self._src; src._current, src.inc(), etc.) in
all hot methods. This eliminates ~3M Python function calls per 500
parses — one extra frame per property access or method delegation.
The delegation wrappers are retained for use by less performance-
sensitive code paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6fdcd12 commit e349950
2 files changed
+175
-161
lines changed
0 commit comments