narui
narui copied to clipboard
Would be nice to have a with_capacity() constructor for Freelist
Just benchmarked your freelist implementation, and it is remarkably fast. Sadly, it lacks a way to preallocate the memory which tanks performance early on. Could you please add the with_capacity constructor? It should be fairly trivial as far as I understand. You'd just need to change this line to Vec::with_capacity() and you basically get ready-made with_capacity constructor. https://github.com/apertus-open-source-cinema/narui/blob/2c758be6c6d6bcc70011ca62f30c9ae91fb06806/freelist/src/lib.rs#L42 Thanks!