Skip to content

refactor(codegen): enrichResolvedType emits canonical ResolvedType layout#579

Merged
cs01 merged 1 commit intomainfrom
refactor/enrichresolvedtype-canonical-layout
Apr 20, 2026
Merged

refactor(codegen): enrichResolvedType emits canonical ResolvedType layout#579
cs01 merged 1 commit intomainfrom
refactor/enrichresolvedtype-canonical-layout

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 20, 2026

Defensive. Previously the enrichResolvedType literal declared only 5 of the 11 fields on the ResolvedType interface. Rule-#5-adjacent: if Phase C interface-layout normalizer misses the literal, native consumers would read wrong GEP offsets for fields. Full 11-field literal in declaration order is robust regardless of normalizer coverage. No behavior change for existing consumers; all were reading base/arrayDepth which was already at its correct slot.

…s in canonical order (defensive native layout)
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results (Linux x86-64)

Benchmark C ChadScript Go Node Place
Cold Start 1.0ms 0.8ms 1.2ms 26.2ms 🥇
Fibonacci 0.816s 0.763s 1.559s 3.225s 🥇
Hash Map Lookup 0.094s 0.062s 0.090s 0.110s 🥇
Binary Trees 1.372s 1.261s 2.700s 1.172s 🥈
File I/O 0.118s 0.090s 0.089s 0.196s 🥈
JSON Parse/Stringify 0.034s 0.051s 0.178s 0.132s 🥈
N-Body Simulation 1.670s 2.124s 2.197s 2.399s 🥈
Regex Match 0.016s 0.005s 0.021s 0.004s 🥈
SQLite 0.053s 0.366s 0.484s 0.415s 🥈
Monte Carlo Pi 0.389s 0.410s 0.405s 2.249s 🥉
Quicksort 0.215s 0.247s 0.213s 0.261s 🥉
Sieve of Eratosthenes 0.015s 0.026s 0.018s 0.038s 🥉
String Manipulation 0.008s 0.018s 0.017s 0.036s 🥉
Matrix Multiply 0.441s 0.977s 0.634s 0.364s #4

CLI Tool Benchmarks

Benchmark ChadScript grep node xxd Place
Hex Dump 0.555s 0.899s 0.133s 🥈
Recursive Grep 0.019s 0.009s 0.101s 🥈

@cs01 cs01 merged commit 63185b9 into main Apr 20, 2026
13 checks passed
@cs01 cs01 deleted the refactor/enrichresolvedtype-canonical-layout branch April 20, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant