I need to have very fast access to a big Map - several millions of entries. Is it worth using an SQLite in-memory database to keep that map as opposed to just having that HashMap in memory?
its depends on the services you require from your data structure. do you only need to retrieve values from the map? or do you need to do a complex query or sorting?.
there is nothing magical about a database internal structure, to make it arbitrary faster then a simple data structure . In the database there are more facilities to manipulate large sets of data that probably will cost in an overheard of CPU and memory. if you only need a dictionary like functionality , go with a map, for something more complex consider a database
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With