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

Function BenchmarkCallFrameStackPushPopAutoGrow

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

Source from the content-addressed store, hash-verified

583}
584
585func BenchmarkCallFrameStackPushPopAutoGrow(t *testing.B) {
586 stack := newAutoGrowingCallFrameStack(256)
587
588 t.ResetTimer()
589
590 const Iterations = 256
591 for j := 0; j < t.N; j++ {
592 for i := 0; i < Iterations; i++ {
593 stack.Push(callFrame{})
594 }
595 for i := 0; i < Iterations; i++ {
596 stack.Pop()
597 }
598 }
599}
600
601func BenchmarkCallFrameStackPushPopFixed(t *testing.B) {
602 stack := newFixedCallFrameStack(256)

Callers

nothing calls this directly

Calls 3

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…