Skip to content

Inline small Lua helpers regardless of popularity - #1289

Merged
Frotty merged 1 commit into
big-lua-opt-updatefrom
codex/lua-small-helper-inlining
Sep 3, 2026
Merged

Inline small Lua helpers regardless of popularity#1289
Frotty merged 1 commit into
big-lua-opt-updatefrom
codex/lua-small-helper-inlining

Conversation

@Frotty

@Frotty Frotty commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • raise Lua's unconditional small-helper inlining cutoff from 20 to 64 measured IM nodes while preserving Jass's cutoff
  • include measured size and rating in optional inliner decision logs
  • cover popular unannotated helpers, the measured stdlib leaves, and the optimized UnitSpatialIndex query shape
  • update the concat-helper regression for the now-valid fully-inlined result

Measurements

  • unit_getX: 59 IM nodes
  • unit_getAbilityLevel: 63 IM nodes
  • real_floor: 35 IM nodes
  • __wurst_intDiv: 31 IM nodes

The cutoff is one node above the largest measured ordinary Lua leaf.

Validation

  • ./gradlew.bat test --tests tests.wurstscript.tests.OptimizerTests --tests tests.wurstscript.tests.LuaBackendAuditTests --tests tests.wurstscript.tests.LuaTranslationTests --tests tests.wurstscript.tests.InterpreterTests
  • ./gradlew.bat test
  • Zombie Defense release compile with -Dwurst.inliner.log=true: packedSlotOf, packedLaneOf, and all observed getLayerAt sites report decision=inline

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T22:09:03.424062Z 2e79698 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty

Frotty commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 2e7969880b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit 5ebbbdc into big-lua-opt-update Sep 3, 2026
3 checks passed
Frotty added a commit that referenced this pull request Sep 4, 2026
* Stop the local-player barrier from refusing inlining on control taint (#1284)

* Optimize Lua array reads and div/mod emission (#1288)

* Optimize Lua array reads and div-mod intrinsics

Remove typed primitive array normalization, invert legacy assertions to require raw reads, and keep erased-generic normalization intact. Emit raw div/mod primitives directly as Lua operators without helper definitions.

* Track Lua numeric intrinsics by IM identity

* Give vararg calls a fixed-arity copy on Lua (#1286)

* Inline small Lua helpers regardless of popularity (#1289)

* Deduplicate Lua callback adapters (#1290)

* Deduplicate Lua callback adapters

* Preserve renamed Lua callback targets

* Bound Lua inlining by register pressure (#1291)
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