lumbda/c
russell@unturf.com 027017f01d C: --fast documented for deep recursion; whitepaper numbers corrected
ack(3,8) was reported as "segfault" for the C impl in the previous
whitepaper revision. That was a stale observation — C has --fast
(bytecode VM with explicit frame stack) that handles deep recursion
cleanly. The benchmark table compared the wrong modes.

Corrected apples-to-apples:
- Python --fast (bytecode VM) — 17,004 ms on ack(3,8)
- C --fast      (bytecode VM) — 1,433 ms  **fastest of the three**
- asm native    (tree-walker) — 2,322 ms

C's --fast wins every workload. asm still beats Python --fast by
~7x despite being a tree-walker, because it skips Python's per-op
overhead entirely.

c/main.c: --help text updated to clarify that --fast is required
(or `ulimit -s unlimited`) for deep recursion in the default
tree-walker mode. Attempted flipping --fast to default; reverted
because that surfaced a cumulative-state buffer overflow in the
bytecode compiler that only triggers after the full 189-test
functional suite but not on isolated scripts. Left as a TODO in
the code comment. 189 C tests + full test-all still pass.

Whitepaper §6.4 table now shows all three impls in their
high-performance configuration. Also noted that a pthread-with-
larger-stack wrapper would let the C tree-walker handle deep
recursion without --fast — tracked as low-priority future work
since --fast is strictly faster regardless.
2026-04-17 18:54:06 -04:00
..
.gitignore Add C implementation: 7,429 lines, 58 tests, identical output 2026-04-14 14:55:17 -04:00
bench.c JIT: add named-let loops, let/let*, and/or, car/cdr/cons, 18 new tests 2026-04-14 20:50:24 -04:00
builtins.c S-expressions over sockets — RPC + remote REPL in portable Scheme 2026-04-17 09:00:04 -04:00
eval.c portal over HTTP: 9/9 cross-runtime, plus eval-to-global-env fix 2026-04-17 13:41:48 -04:00
jit.c JIT: add named-let loops, let/let*, and/or, car/cdr/cons, 18 new tests 2026-04-14 20:50:24 -04:00
jit.h Add GPU architecture notes and JIT header 2026-04-14 19:43:16 -04:00
main.c C: --fast documented for deep recursion; whitepaper numbers corrected 2026-04-17 18:54:06 -04:00
Makefile C: add full continuations, portal save/resume, 7 new tests 2026-04-15 20:07:09 -04:00
portal.c C: add full continuations, portal save/resume, 7 new tests 2026-04-15 20:07:09 -04:00
printer.c Add C implementation: 7,429 lines, 58 tests, identical output 2026-04-14 14:55:17 -04:00
reader.c Add C implementation: 7,429 lines, 58 tests, identical output 2026-04-14 14:55:17 -04:00
test.c C: add full continuations, portal save/resume, 7 new tests 2026-04-15 20:07:09 -04:00
types.c C: add deep_copy_env, VM frame stack for continuations 2026-04-15 19:57:17 -04:00
uncommonlisp.h C: add full continuations, portal save/resume, 7 new tests 2026-04-15 20:07:09 -04:00
vm.c C: add full continuations, portal save/resume, 7 new tests 2026-04-15 20:07:09 -04:00