Conversation
Pull Request Test Coverage Report for Build 15463536475Details
💛 - Coveralls |
…e don't actually need to create a new atom. Filter out any empty terms passed in as well
Contributor
|
Seems reasonable. I dunno if it's worth the effort, although the effort is spent now. :) |
richardkiss
approved these changes
Jun 5, 2025
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.
In the case where a single argument is passed to
concat, we can return the same node. In the case where 0 arguments are passed toconcat, we can returnNIL. AnyNILarguments passed toconcatcan be omitted, funnelling those cases towards one of the previous edge cases.The current implementation copies the bytes on the heap of the node into a new allocation, returning a new node pointing to that heap region. This wastes memory in the case of a single node.
However, we impose limits on node count and heap size. In order to make these optimizations maintain the same behavior , we need to account for optimized away heap space. This patch calls it
ghost_heapand harmonizes the naming of the similar counters toghost_atomsandghost_pairs. Those also track atoms and pairs that count against the limit, but were optimized away.