GopherML / bag

Bag of words as code
MIT License
86 stars 0 forks source link

Implement circular buff #7

Closed itsmontoya closed 4 months ago

itsmontoya commented 4 months ago

The purpose of this PR is to implement a circular buffer and then utilize that buffer instead of a slice for ngrams.

benchmark                old ns/op     new ns/op     delta
Benchmark_toNGrams-8     708           566           -20.01%