Repository navigation
MatchTrie: faster Add and match nodes - #161
Merged
Merged
Conversation
- Add looks up the child itself (the walk knows whether the node is a leaf, so _isLeaf is read once per step and the call goes) - _AddMatchNode appends directly when the offset is behind the last one and there is room (almost always) - the node arrays start with 4096 entries (fewer copies when they grow) The compressed data stays the same byte for byte. Floors (34.8 KB, -c0) under vamos: 468 -> 436 million cycles with CShift 0.40, 417 million with the next CShift (field loads reused). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pv5d5PKEkVRYs6bvBwitQd
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.
More speed for the normal LOB compression (
-c0) on the Amiga. The compressed data stays the same byte for byte.Addlooks up the child itself. It no longer calls_GetChild. The walk already knows whether the current node is a leaf, so_isLeafis read only once per step._AddMatchNodeappends directly when the offset comes after the last one and there is room, which is almost always.AmbermoonPack
AMNP ... -c0under vamos, in cycles:The last column uses the compiler from Robert-Schneckenhaus/CShift#140, which reuses field loads.
Tests with CShift 0.40:
Tools/tests/run.sh104 of 104,--amiga100 of 100. With the compiler from Robert-Schneckenhaus/CShift#140 the results are the same.https://claude.ai/code/session_01Pv5d5PKEkVRYs6bvBwitQd
Generated by Claude Code