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

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -