MCPcopy
hub / github.com/klauspost/compress / BenchmarkBuildDtable

Function BenchmarkBuildDtable

zstd/fse_decoder_bench_test.go:37–57  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

35}
36
37func BenchmarkBuildDtable(b *testing.B) {
38 for name, mk := range predefinedFSEInputs() {
39 b.Run(name, func(b *testing.B) {
40 s := mk()
41 b.ReportAllocs()
42 b.ResetTimer()
43 for i := 0; i < b.N; i++ {
44 // Reset the mutated parts so each iteration does real work.
45 for j := range s.dt {
46 s.dt[j] = 0
47 }
48 for j := range s.stateTable {
49 s.stateTable[j] = 0
50 }
51 if err := s.buildDtable(); err != nil {
52 b.Fatal(err)
53 }
54 }
55 })
56 }
57}

Callers

nothing calls this directly

Calls 3

predefinedFSEInputsFunction · 0.85
FatalMethod · 0.80
buildDtableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…