Repository navigation
v0.4.1
- Fewer allocations when writing lists and arrays of primitives. A
List<T>orT[]ofint,long,decimal,double,bool,Guid,DateTimeand the other primitive types used to box every element on the way out. Elements are now written straight from the typed collection. For 1,000 elements, aList<decimal>allocates 18,232 B instead of 50,280 B, aList<int>6,232 B instead of 30,272 B, and adecimal[]18,448 B instead of 50,480 B; what remains is the output itself. No change to the bytes written, checked by writing 15 primitive types as lists and arrays both ways under nine parameter sets. Reading is unchanged. - README. The Performance tables are re-measured on this code (time, allocation and size, against fastBinaryJSON 1.6.1 and System.Text.Json), and the gzip columns are gone.
docs/benchmarks.mdhas the full BenchmarkDotNet output for every arm, and the reproduction commands now run as written. - No change to the wire format or to the public API, and no measurable change in speed on the benchmark corpus, which has no primitive lists.
Package: https://www.nuget.org/packages/DuraIT.FastBinaryJson/0.4.1