rust - How can I improve compile times when I have a large HashMap literal? -


i have large hashmap of physical measurements (300k+ entries of 3-element tuples), i'd keep hashmap (i move out sqlite db , query it, i'd rather not, performance reasons). including literal makes compile times…long. there better approach? serialise disk in binary format, , load hashmap when binary executes / library loaded? developing , testing using subset works fine, need full data production…

so you're hardcoding hash map? seems perfect hashing problem, see https://github.com/sfackler/rust-phf crate.

as compile times, offload hash table separate crate , cargo recompile crate when hash table data changes.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -