- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkAppend (0.12 sec)
-
src/runtime/slice_test.go
}) b.Run("NoGrow", func(b *testing.B) { s := make([]int, 0, length) for i := 0; i < b.N; i++ { s = append(s[:0:length], make([]int, length)...) } SinkIntSlice = s }) } func BenchmarkAppend(b *testing.B) { b.StopTimer() x := make([]int, 0, N) b.StartTimer() for i := 0; i < b.N; i++ { x = x[0:0] for j := 0; j < N; j++ { x = append(x, j) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 17 09:45:44 UTC 2020 - 10.3K bytes - Viewed (0)