Our benchmarks (https://github.com/travelgateX/presenters-benchmark/) shows that it takes 30% of total execution time to encode the result to JSON and roughly one third of time spent in encoding/json.compact because we use encoding/json.Encoder to write the result. Switch to jsoniter.Encoder could eliminate the overheads. We need to investigate that whether the output would lose compaction.
Our benchmarks (https://github.com/travelgateX/presenters-benchmark/) shows that it takes 30% of total execution time to encode the result to JSON and roughly one third of time spent in
encoding/json.compact
because we useencoding/json.Encoder
to write the result. Switch tojsoniter.Encoder
could eliminate the overheads. We need to investigate that whether the output would lose compaction.