roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.06k stars 213 forks source link

Extract HashmapImpl class from Hashmap class #579

Closed gavv closed 11 months ago

gavv commented 1 year ago

core::Hashmap implements intrusive hashmap with incremental rehashing. It is rather big template class.

To reduce code size and compilation times, it would be great to extract most of its internals to a non-template implementation class. All existing code will continue using Hashmap, however its methods will mostly just invoke similar methods of HashmapImpl and make some type casts. This way, the template part will be small, and non-template part will be compiled once and reused.

We use the same approach with core::Pool and core::PoolImpl.

nolan-veed commented 12 months ago

I'll do.

gavv commented 12 months ago

Thanks!