dgryski / go-trigram

Small trigram indexer
BSD 2-Clause "Simplified" License
34 stars 6 forks source link

intersect could take larger steps #2

Open dgryski opened 10 years ago

dgryski commented 10 years ago

We could speed the scan through ram by jumping multiple cache lines at a time. An increment step of 16 or more.

dgryski commented 10 years ago

At the moment, https://github.com/dgryski/go-trigram/commit/e4d417005206b7e3f3f70427fe21b6a28818afec plays very nicely with cache lines and branch prediction. Any speed up would need to take that into account -- it's not purely algorithmic here, ,we're just tweaking constants.