Use slice instead of list, no map
benchmark old ns/op new ns/op delta BenchmarkJobQueueBump 345 154498 +44682.03% BenchmarkJobQueuePushPopDone10k 9437373 3258204 -65.48% benchmark old allocs new allocs delta BenchmarkJobQueueBump 0 0 +0.00% BenchmarkJobQueuePushPopDone10k 10565 22 -99.79% benchmark old bytes new bytes delta BenchmarkJobQueueBump 0 0 +0.00% BenchmarkJobQueuePushPopDone10k 1452498 385869 -73.43%
This commit is contained in:
@@ -72,7 +72,7 @@ func TestJobQueue(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
if len(q.progress) > 0 || q.queued.Len() != 4 {
|
||||
if len(q.progress) > 0 || len(q.queued) != 4 {
|
||||
t.Fatal("Wrong length")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user