(b *testing.B)
| 412 | } |
| 413 | |
| 414 | func BenchmarkList_Set(b *testing.B) { |
| 415 | const n = 10000 |
| 416 | |
| 417 | l := NewList[int]() |
| 418 | for i := 0; i < 10000; i++ { |
| 419 | l = l.Append(i) |
| 420 | } |
| 421 | b.ReportAllocs() |
| 422 | b.ResetTimer() |
| 423 | |
| 424 | for i := 0; i < b.N; i++ { |
| 425 | l = l.Set(i%n, i*10) |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | func BenchmarkList_Iterator(b *testing.B) { |
| 430 | const n = 10000 |