- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for BenchmarkSaveRestore (0.14 sec)
-
src/index/suffixarray/suffixarray.go
for p := binary.MaxVarintLen64; p < size; n++ { x, w := binary.Uvarint(buf[p:]) data.set(n, int64(x)) p += w } return } const bufSize = 16 << 10 // reasonable for BenchmarkSaveRestore // Read reads the index from r into x; x must not be nil. func (x *Index) Read(r io.Reader) error { // buffer for all reads buf := make([]byte, bufSize) // read length
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9.5K bytes - Viewed (0) -
src/index/suffixarray/suffixarray_test.go
b.SetBytes(int64(len(data))) b.ReportAllocs() for i := 0; i < b.N; i++ { New(data) } }) } }) } }) } } func BenchmarkSaveRestore(b *testing.B) { r := rand.New(rand.NewSource(0x5a77a1)) // guarantee always same sequence data := make([]byte, 1<<20) // 1MB of data to index for i := range data { data[i] = byte(r.Intn(256)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 14.1K bytes - Viewed (0)