24a2b57e29
the motivation for this commit is long and detailed and has been documented externally here: https://gist.github.com/mschoch/5cc5c9cf4669a5fe8512cb7770d3c1a2 the core of the changes are: 1. recognize that collector/searcher need only a fixed number of DocumentMatch instances, and this number can be determined from the structure of the query, not the size of the data 2. knowing this, instances can be allocated in bulk, up front and they can be reused without locking (since all search operations take place in a single goroutine 3. combined with previous commits which enabled reuse of the IndexInternalID []byte, this allows for no allocation/copy of these bytes as well (by using DocumentMatch Reset() method when returning entries to the pool |
||
---|---|---|
.. | ||
scorer_conjunction.go | ||
scorer_constant_test.go | ||
scorer_constant.go | ||
scorer_disjunction.go | ||
scorer_term_test.go | ||
scorer_term.go | ||
sqrt_cache.go |