You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-19 21:45:50 +02:00
51b03667ac
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7935 ``` $ go test -run=^$ -bench=BenchmarkMap goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/attribute cpu: 13th Gen Intel(R) Core(TM) i7-13800H BenchmarkMap/Len3/Value-20 12423774 143.1 ns/op 192 B/op 1 allocs/op BenchmarkMap/Len3/KeyValue-20 8123966 170.4 ns/op 192 B/op 1 allocs/op BenchmarkMap/Len3/AsMap-20 12685639 111.0 ns/op 192 B/op 1 allocs/op BenchmarkMap/Len3/String-20 4482690 250.1 ns/op 128 B/op 1 allocs/op BenchmarkMap/Len3/Emit-20 5927258 205.5 ns/op 128 B/op 1 allocs/op BenchmarkMap/Len5Nested/Value-20 2773639 387.1 ns/op 320 B/op 1 allocs/op BenchmarkMap/Len5Nested/KeyValue-20 3093283 404.7 ns/op 320 B/op 1 allocs/op BenchmarkMap/Len5Nested/AsMap-20 8646662 161.1 ns/op 320 B/op 1 allocs/op BenchmarkMap/Len5Nested/String-20 2785362 499.1 ns/op 208 B/op 1 allocs/op BenchmarkMap/Len5Nested/Emit-20 2882395 375.2 ns/op 208 B/op 1 allocs/op ``` ``` $ go test -run=^$ -bench=BenchmarkHashValueMap goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/attribute cpu: 13th Gen Intel(R) Core(TM) i7-13800H BenchmarkHashValueMap/Len2-20 7589696 133.0 ns/op 80 B/op 1 allocs/op BenchmarkHashValueMap/Len5-20 6254871 205.7 ns/op 80 B/op 1 allocs/op BenchmarkHashValueMap/Len8Nested-20 2726431 424.1 ns/op 80 B/op 1 allocs/op ```