MCPcopy Index your code
hub / github.com/yuin/gopher-lua / BenchmarkCallFrameStackPushPopShallowFixed

Function BenchmarkCallFrameStackPushPopShallowFixed

state_test.go:634–648  ·  view source on GitHub ↗
(t *testing.B)

Source from the content-addressed store, hash-verified

632}
633
634func BenchmarkCallFrameStackPushPopShallowFixed(t *testing.B) {
635 stack := newFixedCallFrameStack(256)
636
637 t.ResetTimer()
638
639 const Iterations = 8
640 for j := 0; j < t.N; j++ {
641 for i := 0; i < Iterations; i++ {
642 stack.Push(callFrame{})
643 }
644 for i := 0; i < Iterations; i++ {
645 stack.Pop()
646 }
647 }
648}
649
650func BenchmarkCallFrameStackPushPopFixedNoInterface(t *testing.B) {
651 stack := newFixedCallFrameStack(256).(*fixedCallFrameStack)

Callers

nothing calls this directly

Calls 3

newFixedCallFrameStackFunction · 0.70
PushMethod · 0.65
PopMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…