Replace mutable list usages with TreeList in stack operations#1033
Open
s5bug wants to merge 8 commits into
Open
Replace mutable list usages with TreeList in stack operations#1033s5bug wants to merge 8 commits into
s5bug wants to merge 8 commits into
Conversation
9ae3fb8 to
2ddfb0a
Compare
24b4424 to
b7864a8
Compare
Robotgiggle
reviewed
Jul 16, 2026
Robotgiggle
left a comment
Member
There was a problem hiding this comment.
I haven't tested exhaustively but nothing seems to be broken. Simulate still works fine, as does the Shepherd Directrix.
|
|
||
| - Removed APIs deprecated in `0.11.4` ([#1126](https://github.com/FallingColors/HexMod/pull/1126), [#1127](https://github.com/FallingColors/HexMod/pull/1127) [#1129](https://github.com/FallingColors/HexMod/pull/1129), [#1137](https://github.com/FallingColors/HexMod/pull/1137), [#1142](https://github.com/FallingColors/HexMod/pull/1142)) @s5bug | ||
| - ListIota now uses the asymptotically-efficient TreeList internally ([#1032](https://github.com/FallingColors/HexMod/pull/1032)) @s5bug | ||
| - SpellList has been removed, the Casting Image and Casting Frames now store iotas in a TreeList ([#1033](https://github.com/FallingColors/HexMod/pull/1033)) @s5bug |
|
|
||
| val image2 = image.withUsedOp().copy(stack = stack) | ||
| // FIXME this is expensive if the stack is incredibly large | ||
| // someone should rewrite this op to cut and replace a `slice` of the `TreeList` stack |
Member
There was a problem hiding this comment.
I think I have an implementation for this - can I push it to this PR or do you want it in a separate PR after this goes in?
Member
There was a problem hiding this comment.
Ok, it's been pushed. Let me know if you think I did anything wrong.
Member
There was a problem hiding this comment.
Is there any advantage to having newOrder be a TreeList? Or would it be better to have it also be a standard MutableList?
Contributor
Author
|
New Swindler's looks good, I just replaced the |
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.
Stacked on #1032
TODO is make a pass through all the list ops and make sure they're not doing O(n) copies but I'm not going to waste my time with that in case I have to go back and modify other stuff