SIMD Utf8Transcoder.GetUtf8ByteCount + test suite Introduced SIMD-accelerated Utf8Transcoder.GetUtf8ByteCount for efficient UTF-8 byte counting, replacing all writer-side Encoding.UTF8.GetByteCount usages. Added 29 unit tests for correctness across ASCII, Hungarian, CJK, emoji, and boundary cases. Updated benchmarks to ensure FixStr is bypassed and wire mode is selectable. Documented implementation and dead-code review in BINARY_TODO.md. No public API changes. |
||
|---|---|---|
| .. | ||
| AyCode.Core.Serializers.Console.csproj | ||
| Program.cs | ||
| README.md | ||
README.md
AyCode.Core.Serializers.Console
Standalone benchmark console application for comparing serializer performance. Targets .NET 9. Measures serialize/deserialize speed, output size, and compression across multiple serializers and data shapes.
Compared Serializers
- AcBinary — Multiple configurations: Default, NoRef, FastMode, NoIntern, with/without source generation
- MessagePack
- MemoryPack
(System.Text.Json and Newtonsoft.Json comparisons exist but are currently commented out.)
Key Files
Program.cs— Benchmark runner. Modes:all(default),quick(fewer iterations),serialize,deserialize,profiler(memory profiler warmup). Outputs results toTest_Benchmark_Results/Benchmark/. Iterations: 5000 warmup + 1000 test (Release), 0+1 (Debug).BenchmarkTestDataProvider.cs— Test data factory producing 5 data shapes:- Small (2x2x2x2), Medium (3x3x3x4), Large (5x5x5x10)
- Repeated Strings (10 items, string deduplication testing)
- Deep Nested (2x4x4x8, depth stress test)
- Uses
TestOrdermodel fromAyCode.Core.Testswith configurable IId reference percentages.
Dependencies
| Dependency | Purpose |
|---|---|
AyCode.Core |
Core library with AcBinary serializer |
AyCode.Core.Tests |
Test models (TestOrder, TestDataFactory, etc.) |
MemoryPack |
Competitor benchmark |
MessagePack |
Competitor benchmark |
Newtonsoft.Json |
Competitor benchmark |