Skip to content

StringReverse: .NET 11, text-element fix and two-length benchmark - #2400

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/89415-csharp-reverse-string
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/89415-csharp-reverse-string

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves strings-csharp/StringReverse to net11.0 with BenchmarkDotNet 0.15.8 (InProcess, MemoryDiagnoser), MSTest 4.5.3, Microsoft.NET.Test.Sdk 18.12.0 and coverlet.collector 10.1.0. TextElementEnumeratorMethod no longer returns a null character for a one-element string. Program.cs now reverses the article's abcdefg input and shows what char-based reversal does to surrogate pairs and combining marks next to the text-element method. The benchmark runs at 64 and 1,024 characters, returns every result and reports allocations. Four new tests cover the single-element, combining-mark and surrogate-pair cases.

…-length benchmark

Target net11.0; BenchmarkDotNet 0.15.8 with InProcess and MemoryDiagnoser; MSTest 4.5.3, Microsoft.NET.Test.Sdk 18.12.0, coverlet.collector 10.1.0.
TextElementEnumeratorMethod no longer returns a null character for a one-element string.
Program.cs reverses abcdefg and shows the surrogate pair and combining mark cases; benchmarks run at 64 and 1024 characters and return their results; four new tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant