Skip to content

refactor(codegen): migrate map-allocator to typeOf()#584

Merged
cs01 merged 1 commit intomainfrom
refactor/typeof-map-allocator
Apr 20, 2026
Merged

refactor(codegen): migrate map-allocator to typeOf()#584
cs01 merged 1 commit intomainfrom
refactor/typeof-map-allocator

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 20, 2026

Summary

User-facing effect

  • No behavior change. Continues Phase-E "typed AST" convergence — every codegen site reads types through one canonical lookup. Eliminates "two codegen sites asked the resolver at different times and got different answers" silent-wrong bugs for Map/Set allocation.

Test plan

  • npm run verify — full tests + 3-stage self-host green locally
  • CI green

…e first, falls through to resolver (phase-e step 5)
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results (Linux x86-64)

Benchmark C ChadScript Go Node Place
Cold Start 0.8ms 0.8ms 1.3ms 28.0ms 🥇
Fibonacci 0.814s 0.763s 1.561s 3.162s 🥇
Hash Map Lookup 0.101s 0.063s 0.092s 0.131s 🥇
Binary Trees 1.692s 1.332s 2.735s 1.223s 🥈
File I/O 0.118s 0.093s 0.087s 0.206s 🥈
JSON Parse/Stringify 0.035s 0.053s 0.177s 0.138s 🥈
N-Body Simulation 1.670s 2.123s 2.202s 2.403s 🥈
Regex Match 0.016s 0.005s 0.021s 0.004s 🥈
SQLite 0.052s 0.373s 0.497s 0.435s 🥈
Monte Carlo Pi 0.389s 0.410s 0.405s 2.249s 🥉
Quicksort 0.214s 0.246s 0.213s 0.263s 🥉
Sieve of Eratosthenes 0.017s 0.027s 0.018s 0.038s 🥉
String Manipulation 0.008s 0.019s 0.016s 0.037s 🥉
Matrix Multiply 0.436s 0.676s 0.614s 0.369s #4

CLI Tool Benchmarks

Benchmark ChadScript grep node xxd Place
Hex Dump 0.567s 0.979s 0.129s 🥈
Recursive Grep 0.020s 0.010s 0.103s 🥈

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