add 3 new "improvements": to SuffixArray, to UnihexProvider, and for compacting the lists made in BlockModels - #192
Open
AnAwesomGuy wants to merge 3 commits into
Open
add 3 new "improvements": to SuffixArray, to UnihexProvider, and for compacting the lists made in BlockModels#192AnAwesomGuy wants to merge 3 commits into
SuffixArray, to UnihexProvider, and for compacting the lists made in BlockModels#192AnAwesomGuy wants to merge 3 commits into
Conversation
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.
honestly these shouldnt save a crazy amount of ram, the SuffixArray one should save around ~12 MB in a decent sized modpack (it halves the size of a field in SuffixArray), and the UnihexProvider and BlockModel ones should each save a couple MB
basically what they each do:
SuffixArray: makescharsa CharList instead of an IntList, halving the memory footprint. normally, only chars are inserted with -1 meaning the end of a string, but when using a CharList, -1 is replaced with\u0000(null char).UnihexProvider: compacts the glyphs in UnihexProvider to use flat fields instead of arrays. for example, inByteContents, instead of using a 16-length byte array, it uses two long fields. (i didnt do the int ones as those are not commonly used)BlockModel: creates immutable copy of the Lists in BlockModel (the overrides are especially affected by this as they are usually empty) and so it reduces the amount of empty ArrayLists.feel free to just merge parts of this or not merge it at all. also,
CodepointMapshould definitely be optimized but idk how to do that lol.