Mendeleev.jl icon indicating copy to clipboard operation
Mendeleev.jl copied to clipboard

Vector instead of Dict performance

Open chakravala opened this issue 2 years ago • 1 comments

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 avatar Dec 09 '22 00:12 chakravala

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.

Eben60 avatar Dec 09 '22 21:12 Eben60