Mendeleev.jl
Mendeleev.jl copied to clipboard
Vector instead of Dict performance
if you're using sequential integers as keys, you might as well use a Vector with sequential integer indices, as that has faster
https://github.com/Eben60/Mendeleev.jl/blob/main/src/data.jl/ionization_data.jl
chakravala, thank you for looking onto my source code - I know you are a highly competent Julia developer.
I must however say, I didn't at all try to optimize the package for the speed, not even tested. Actually I can't imagine any use case where the speed can be relevant.
So while in principle you are right, I'd in the moment leave it as it is. I'd also leave the issue open, but as low priority for the code refactoring some day.