Our great sponsors
-
graphql-go-tools
GraphQL Router / API Gateway framework written in Golang, focussing on correctness, extensibility, and high-performance. Supports Federation v1 & v2, Subscriptions & more.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
There's going to be experimental support for built-in iteration in 1.22: https://github.com/golang/go/issues/61897
https://github.com/wundergraph/graphql-go-tools/blob/dcd50bd...
Each iteration of this benchmark measures the aggregate performance of
- 1x ParseObject
- 3x AppendObject
- 3x MergeNodesWithPath
- 1x PrintNode
- 1x bytes.Equal comparison of two byte slices
The benchmark isn't actually benchmarking MergeNodesWithPath, it's benchmarking a much larger composite operation, which includes (multiple) calls to MergeNodesWithPath but also all of the above listed calls as well. If you want to measure MergeNodesWithPath, you would need to have each iteration of the loop do a single MergeNodesWithPath call, on the same JSON method receiver, and with the same input parameters.