Open adithyaov opened 1 year ago
Poke can be improved if I assume little endian format. But that way we are specific to little endian. To understand the above comment, you'll need to see the code.
With INLINE
-ing:
Data.Serialize(cpuTime)
Benchmark default(0)(μs) default(1) - default(0)(%) default(2) - default(0)(%) default(3) - default(0)(%) default(4) - default(0)(%) default(5) - default(0)(%) default(6) - default(0)(%) default(7) - default(0)(%) default(8) - default(0)(%)
------------- -------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- --------------------------
All.roundtrip 115.02 +358.38 +448.35 +618.31 +653.10 +807.02 +839.68 +921.77 +1043.94
All.encode 115.34 +332.43 +378.48 +506.86 +551.06 +651.72 +674.58 +766.36 +811.68
All.poke 27.98 +25.03 +199.10 +499.77 +405.37 +601.91 +598.51 +897.78 +899.88
All.peek 28.21 -0.65 +197.34 +494.68 +497.52 +613.90 +494.18 +493.52 +298.44
Data.Serialize(Allocated)
Benchmark default(0)(Bytes) default(1) - default(0)(%) default(2) - default(0)(%) default(3) - default(0)(%) default(4) - default(0)(%) default(5) - default(0)(%) default(6) - default(0)(%) default(7) - default(0)(%) default(8) - default(0)(%)
------------- ----------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- --------------------------
All.poke 0.00 NaN NaN NaN NaN NaN NaN NaN NaN
All.encode 2399075.00 -1.35 -1.35 -1.35 -1.35 -1.35 -2.48 -0.53 +33.34
All.peek 0.00 NaN NaN NaN NaN NaN NaN NaN NaN
All.roundtrip 2399075.00 -0.53 -0.53 -1.35 -1.35 -2.48 -2.48 -2.48 +32.79
Data.Serialize(maxrss)
Benchmark default(0)(MiB) default(1) - default(0)(%) default(2) - default(0)(%) default(3) - default(0)(%) default(4) - default(0)(%) default(5) - default(0)(%) default(6) - default(0)(%) default(7) - default(0)(%) default(8) - default(0)(%)
------------- --------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- --------------------------
All.poke 18.00 +11.11 0.00 0.00 0.00 0.00 +11.11 +11.11 0.00
All.roundtrip 18.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
All.peek 18.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +5.56
All.encode 20.00 -11.11 -11.11 -11.11 -11.11 -11.11 0.00 -11.11 -11.11
Benchmarks for variable length unsigned integer (Word64):