github.com/benz9527/xboot@v0.0.0-20240504061247-c23f15593274/lib/list/x_arena_skl_node_test.go (about) 1 package list 2 3 import ( 4 "testing" 5 ) 6 7 func BenchmarkXArenaSklElement(b *testing.B) { 8 b.ReportAllocs() 9 for i := 0; i < b.N; i++ { 10 obj := &xArenaSklElement[uint64, []byte]{} 11 obj.indices = make([]*xArenaSklNode[uint64, []byte], 10) 12 _ = obj 13 } 14 } 15 16 func BenchmarkXArenaSklElement2(b *testing.B) { 17 b.ReportAllocs() 18 for i := 0; i < b.N; i++ { 19 obj := new(xArenaSklElement[uint64, []byte]) 20 obj.indices = make([]*xArenaSklNode[uint64, []byte], 10) 21 _ = obj 22 } 23 }