Eben60 / Mendeleev.jl

A Julia package for accessing chemical elements data.
https://eben60.github.io/Mendeleev.jl/
Other
19 stars 0 forks source link

Compile time #2

Closed Eben60 closed 2 years ago

Eben60 commented 2 years ago

Currently install/compile of the package takes some 3 min. on my notebook. Most of the time is spent in the initialisation of the Element_M structs in the line elements_arr = Vector{Element_M}(Element_M.(els_data)) # no idea why not working without this type casting of the file Mendeleev.jl/src/Mendeleev.jl

I suppose the long compilation time is due to the type instability because of the missings - almost every 70-elements-tuple has a different type. One could use NaNs, empty strings etc. instead. Or probably the loop parallelization could reduce the compile time to something more acceptable like 1 min.

Eben60 commented 2 years ago

Compile time brought down to 15s