MCPcopy Create free account
hub / github.com/yuin/gopher-lua / BenchmarkRegistrySetTop

Function BenchmarkRegistrySetTop

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

Source from the content-addressed store, hash-verified

749}
750
751func BenchmarkRegistrySetTop(t *testing.B) {
752 al := newAllocator(32)
753 sz := 256 * 20
754 reg := newRegistry(registryTestHandler(0), sz, 32, sz*2, al)
755
756 t.ResetTimer()
757
758 for j := 0; j < t.N; j++ {
759 reg.SetTop(sz)
760 reg.SetTop(0)
761 }
762}

Callers

nothing calls this directly

Calls 4

newAllocatorFunction · 0.85
registryTestHandlerTypeAlias · 0.85
newRegistryFunction · 0.70
SetTopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…