Skip to content

Commit 9ffd530

Browse files
committed
perf: optimize Format runtime with cache, direct Val dispatch, and Long fast path
Upstream: jit branch commits e98cd1f (format chunk runtime) and 6524d77 (direct Val dispatch) Key optimizations: - LRU cache (256 entries) for parsed format strings avoids re-parsing - RuntimeFormat pre-processes parsed format into arrays with metadata - Direct Val dispatch bypasses Materializer for Str/Num/Bool/Null - Long fast path in formatInteger avoids BigInt allocation - widenRaw fast path skips widen when no width is specified - while-loop replaces for/zipWithIndex to avoid iterator allocation - StringBuilder pre-sizing based on static content length - hasAnyStar flag skips star processing when format has no * specifiers
1 parent 3ff6d95 commit 9ffd530

1 file changed

Lines changed: 211 additions & 96 deletions

File tree

0 commit comments

Comments
 (0)