Having Linear power-of-two mem_config would allow to use cheap bit shifts instead of divisions and modulos.
Thou I tested code from Linear as-is with POT capacity, and it seems that compiler are able to optimize it into bit operations in optimized build...
P.S. Maybe other mem_config modes could benefit from using POT size as well.
Having Linear power-of-two mem_config would allow to use cheap bit shifts instead of divisions and modulos.
Thou I tested code from Linear as-is with POT capacity, and it seems that compiler are able to optimize it into bit operations in optimized build...
P.S. Maybe other mem_config modes could benefit from using POT size as well.