You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bugc: example program-validity test cost grows with instructions times locals #396
The "Program validity" test in packages/bugc/test/examples/examples.test.ts validates every distinct instruction context with Hyperjump. Because bugc lists a function's locals at every instruction, consecutive instructions get mostly distinct, large contexts, so the context cache rarely hits and the cost grows with instructions times locals in scope. advanced/token-registry.bug took 17.4s at O0 on CI (4.7s at O1), which is why #395 raised the per-test timeout from 10s to 30s. The next larger example will cross that bound too.
Options, cheapest first: validate smaller units (each distinct variable entry or pointer inside a context) so they share across instructions; validate only contexts that differ from the previous instruction's; or validate the full context set at one level and the context-free skeleton at the others. Worth timing per example first to confirm the cost is validation and not compilation.
Activity