MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / generateRepeatedStrings

Function generateRepeatedStrings

string_interning_test.go:236–242  ·  view source on GitHub ↗
(count, uniqueCount int)

Source from the content-addressed store, hash-verified

234}
235
236func generateRepeatedStrings(count, uniqueCount int) []string {
237 result := make([]string, count)
238 for i := 0; i < count; i++ {
239 result[i] = fmt.Sprintf("value_%d", i%uniqueCount)
240 }
241 return result
242}
243
244// Benchmark string interning
245func BenchmarkStringInterning(b *testing.B) {

Callers 1

TestShouldInternColumnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected