Repository navigation
Repeat writes the text once; cut 2.18.1 - #62
Merged
Merged
Conversation
Repeat(n) filled an array with n references and concatenated them, about 18 bytes and 16-28 ns a character. It now builds the string with a few doubling block copies and the runs directly; one style over the whole text becomes one run without the coalescing pass. Space.Repeat(1000000) goes from 18.5 ms / 18 MB to 1.0 ms / 2 MB, Space.Repeat(1000) from 27.8 us to 0.4 us. The result matches the concatenated copies. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DGK2ENFwejRuxQ4am7VoVo
Put AsciiFold under 2.17.0, the theme colours under 2.18.0 and the Repeat change under 2.18.1, move their API to PublicAPI.Shipped.txt, and validate packages against 2.18.0. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DGK2ENFwejRuxQ4am7VoVo
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.
Requested by Grave · project thread
Before:
MarkupText.Repeat(n)filled an array with n references to the text and concatenated them, about 18 bytes and 16-28 ns a character. SharpMUSH'sspace()and every layout fill and blank line go through it.After: the string is built with a few doubling block copies and the runs are written directly. One style over the whole text becomes a single run without the coalescing pass. The result matches the concatenated copies.
Space.Repeat(1000)Plain("ab").Repeat(1000)Space.Repeat(1000000)Plain("ab").Repeat(1000000)(Release build, net11.0 RC1, 4-core cloud container.)
How:
Repeat_MatchesConcatenatedCopieschecks text and runs against the old concatenation for plain, single-style, mixed-style and bell (point) units at several counts;Repeat_PlainText_AllocatesOnlyTheStringbounds the allocation.Release cut (second commit): v2.17.0 and v2.18.0 were tagged without a cut, so this puts AsciiFold under 2.17.0, the theme colours under 2.18.0 and this change under 2.18.1, moves their API to
PublicAPI.Shipped.txt, and validates packages against 2.18.0.dotnet pack -c Releasewith 2.18.1 passes package validation. Tagv2.18.1after merge.🤖 Generated with Claude Code
https://claude.ai/code/session_01DGK2ENFwejRuxQ4am7VoVo
Generated by Claude Code
Summary by CodeRabbit