alecthomas / go_serialization_benchmarks

Benchmarks of Go serialization methods
https://alecthomas.github.io/go_serialization_benchmarks/
1.56k stars 158 forks source link

add low level IDR encoding demo #156

Closed chmike closed 2 months ago

chmike commented 2 months ago

The Information Data Representation (IDR) is a work in progress. This code benchmarks the low level encoding/decoding functions to write custom value encoding/decoding.

The ditp/idr/low package supports full time range with time offset and even time zone abbreviation encoding/decoding. For the benchmark I use the same nsec time encoding as benc.

matheusd commented 2 months ago

The ditp/idr/low package supports full time range with time offset and even time zone abbreviation encoding/decoding.

If the low level package supports it natively (i.e. low.PutTime...) I'd suggest using that instead of nsec to demonstrate it

deneonet commented 2 months ago

For demonstration, you should also rerun the benchmarks as instructed in the README.

chmike commented 2 months ago

I have applied your change requests and your suggestion to use the full time with tz offset.

But I don't see the point with the time encoding because we end up comparing apples with oranges. It is obviously slower and bigger with the full time encoding.

chmike commented 2 months ago

I did run the benchmark. Do you want me to commit it as well ?

deneonet commented 2 months ago

Yes.

chmike commented 2 months ago

Thank you.