The fastest and most effective way to search for key value pairs in Java?

Disclaimer:

What is the fastest and least memory drain method for searching key value pairs? I will store items in a key value relationship, and I need to access them quickly Should I use SQLite database? A map? A hash table? A HashMap? Please give some advantages / disadvantages of using any method

Solution

Any map structure based on hash is the way to go, as long as your hash function key is valid You can use the value ID: s as the search result to save memory during the search

If your data is already in the database, you can leave the search entirely to RDBMS for this purpose

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>