Entropy uses map to store frequncies, a vector should be used
rpkrawczyk opened this issue · 2 comments
rpkrawczyk commented
in float Common::Entropy(string trait) a map<char,int> is used to store frequencies. Every access via operator[] is logarithmic in the size of the container which would result in a slower runtime.
rpkrawczyk commented
Use vector, remember to skip zero frequency elements.
c3rb3ru5d3d53c commented
Fixed, and in milestone branch now thanks to @emgon !