Closed barucden closed 2 years ago
:thinking: Ack! Sorry for this languishing. I could have sworn I replied to this and merged it already... :scream:
Anyway, looks great - these functions are rarely bottlenecks, but more speed with no cost is obviously great. Thanks for the contribution!
Hi. I noticed that some computations could be saved in the definition of
shannon
andginisimpson
.I am not a user of this package, so I am not sure about the impact. However, some measurements:
The speed difference should increase with the length of the input.
Be aware that the result of the new
shannon
is little bit off due to numerical accuracy.