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

Function BenchmarkCallFrameStackPushPopFixedNoInterface

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

Source from the content-addressed store, hash-verified

648}
649
650func BenchmarkCallFrameStackPushPopFixedNoInterface(t *testing.B) {
651 stack := newFixedCallFrameStack(256).(*fixedCallFrameStack)
652
653 t.ResetTimer()
654
655 const Iterations = 256
656 for j := 0; j < t.N; j++ {
657 for i := 0; i < Iterations; i++ {
658 stack.Push(callFrame{})
659 }
660 for i := 0; i < Iterations; i++ {
661 stack.Pop()
662 }
663 }
664}
665
666func BenchmarkCallFrameStackUnwindAutoGrow(t *testing.B) {
667 stack := newAutoGrowingCallFrameStack(256)

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…