-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csharp: sync v1.1.0
from John-Paul-R/FlexVer
#19
Conversation
* Fixup packaging * add separate readme to get ride of plaintext-rendered img tag
* v1 * fully non-heap-allocating | Method | Mean | Error | StdDev | Gen0 | Allocated | |---------------------------------- |----------:|----------:|----------:|-------:|----------:| | CompareAll_AV2_StackAlloc_ToArray | 4.066 us | 0.0598 us | 0.0559 us | - | - | | CompareAll_Existing | 29.137 us | 0.5789 us | 0.6434 us | 0.3967 | 33672 B | * merge into main FlexVerComparer * add benchmark harness * fixup comment, formatting * todo * make GetNextVersionComponent a bit more decipherable * less-allocating VersionComponent ToString, why not * update dotsettings for limited code style * fixes/simplifications based on tests/spec * consts for char literals * use `ushort` instead of `int` for numeric bits, since `char` is 2-bytes * minor changes from perf test
* Switch to central build/package management * don't pack benchmarks
v1.1.0
from John-Paul-R/FlexVer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing now that this implementation never followed the spec — it uses UTF-16 code units instead of Unicode codepoints. I didn't notice due to my lack of familiarity with C#. Please switch back to int
s and use something like EnumerateRunes
.
* Use `Rune`s (Unicode codepoint) instead of incorrectly using UTF-16 units * Read benchmark test cases from `test/test_vectors.txt` instead of string literal
instead of incorrectly incrementing based on IsHighSurrogate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR deals with some build/packaging details, and reworks the comparer implementation to be faster and make no heap allocations.
Benchmark results, using the version strings in the test harness:
NuGet listing from these build changes: https://www.nuget.org/packages/FlexVer