plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
09c2e37
— Peter John
2026-11-16T20:27:19+05:30
plan: U4c closures always inlined by size
docs/plans/2026-11-13-no-globals-tests-ports.md
CHANGED
|
@@ -51,6 +51,6 @@ Decisions (user's answers):
|
|
|
51
51
|
- **U4 perf** (user, 2026-11-16: "Yes please 1, 2, 3 as others in backlog"), one fresh agent each, after U1+U2, each measured before/after on Orbit Runner, Clockwork and the benchmarks:
|
|
52
52
|
- **U4a typed closures:** a closure struct per signature called with `call_ref` (backlog: `anyref`, two casts and an indirect call per call, two objects per closure); constructor shorthand `OnFrame(Tick)` for a variant passed as a function.
|
|
53
53
|
- **U4b paint without the list:** `view()`'s list painted as it is built, no per-frame `List<View>` and fewer trait calls; the declarative paint's +5% and T7's +2% back.
|
|
54
|
-
- **U4c in-place misses
|
|
54
|
+
- **U4c closures always inlined + in-place misses** (user, 2026-11-16: "Yes please do that rather", the size rule instead of an `inline` keyword): closure_spec's program-wide 8-copy cap becomes a size rule: every literal closure passed to a small known callee is specialised, the cap kept only for big callees. Then the in-place misses: backlog's 36 of 56 (a value rebound by a pattern, receiver read again after a method call, shared value, field passed on, argument from inside a closure); the Elm `update` regression.
|
|
55
55
|
- **U4d the backlog's other runtime perf items:** a value struct in an enum payload boxed twice; statics slower than free functions; the smaller codegen items (`br_on_cast`, inliner on `unbox.*`, empty supertypes, purity of closure-taking functions); `Map` reuse alongside sharing. Compile-time items stay with the modular checker in the backlog.
|
|
56
56
|
- **U5 field layout** (user, 2026-11-16: the grouped form, "With commas after all fields" "except the last one"): `struct PlayingScreen[ScreenSlice<PlayAction>](` / ` dice: Dice, ticks: Int, clock: Float,` / ` score: Int, best: Int, lives: Int, over: Bool,` / ` ship: Ship, orbs: List<Orb>, mines: List<Mine>, rings: List<Ring>,` / ` assets: Assets` / `) =`. This already parses (no grammar change); the formatter keeps the user's line grouping, and games and std types with many fields move to grouped lines; docs show the form. Starts when U4a or U4b finishes.
|