GopherML / bag

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

Implement circular buff #7

Closed itsmontoya closed 3 months ago

itsmontoya commented 3 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%