Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b0491dfc4
ℹ️ 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
marked this pull request as draft
October 22, 2026 19:48
Frotty
marked this pull request as ready for review
October 22, 2026 20:14
Frotty
marked this pull request as draft
October 22, 2026 20:26
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design hold (2026-10-22): The author does not accept the current fixed-size
array[1]used as growable Lua storage and the target-specific storage plumbing as the release design. Keep this implementation as an experiment; it is not ready to merge. A replacement should define one reusable typed growable-buffer contract with explicit lifetime/capacity semantics, backend-specific storage beneath it, and no ArrayList-specific intrinsic. Generic compiler correctness/optimizer fixes should be assessed independently. Current benchmarks do not establish actual-game suitability.ArrayList currently carries Jass arena allocation, offsets, growth copies, and free-section bookkeeping into Lua. This change uses native per-list Lua buffers while preserving the integer object identity and explicit Wurst lifetime model. Jass keeps its arena storage.
The stdlib implementation is in wurstscript/WurstStdlib2#517; this PR pins that commit and supplies the compiler support:
Validation on Windows:
The checked-in benchmark compiles the actual old and new ArrayList sources with the same compiler and runs their emitted Lua. Its 140 stock Lua 5.3 samples show growth/refill gains; scan and tiny-list lifetime timings are inconclusive on this noisy host. With GC stopped, maximum native heap growth after warm-up was 1.230 KiB, including 524,288 short list lifetimes, below the runner's 8 KiB gate. This is retained heap growth, not an exact allocation count or peak memory measurement.
Buffers remain strongly retained at their high-water usage and references are cleared explicitly; the implementation does not depend on garbage collection to reclaim each list lifetime. Table overhead and retained capacity still need profiling in Warcraft III. See docs/LUA_COLLECTION_STORAGE.md and the checked-in CSV for reproduction and limits.
Draft pending actual-game profiling and fresh review. No claim of a whole-map speedup.