Closed yanns closed 1 year ago
By pre-allocating arrays, we can avoid resizing. Locally almost all benchmarks have improved.
awesome, I didn't know there is size_hint available
size_hint
I think I went the same path as you in https://github.com/yanns/proto_refexp/pull/4 ;)
But thanks to your repo, I could simplify my code, thanks!
By pre-allocating arrays, we can avoid resizing. Locally almost all benchmarks have improved.