(t *testing.B)
| 599 | } |
| 600 | |
| 601 | func BenchmarkCallFrameStackPushPopFixed(t *testing.B) { |
| 602 | stack := newFixedCallFrameStack(256) |
| 603 | |
| 604 | t.ResetTimer() |
| 605 | |
| 606 | const Iterations = 256 |
| 607 | for j := 0; j < t.N; j++ { |
| 608 | for i := 0; i < Iterations; i++ { |
| 609 | stack.Push(callFrame{}) |
| 610 | } |
| 611 | for i := 0; i < Iterations; i++ { |
| 612 | stack.Pop() |
| 613 | } |
| 614 | } |
| 615 | } |
| 616 | |
| 617 | // this test will intentionally not incur stack growth in order to bench the performance when no allocations happen |
| 618 | func BenchmarkCallFrameStackPushPopShallowAutoGrow(t *testing.B) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…