Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do we use hash tables in practise?

I just read about Hash tables and am curious if we use it in practise because if I write a program that stores data in a Hash table, the storage will only be temporary. So, why not use a database to store it ?

In other words, what kinds of real world programs use hash tables for their functioning?

like image 486
Programmer Avatar asked May 20 '26 01:05

Programmer


1 Answers

You would use hash tables to store data while you are working. Using the database for that would in many cases be orders of magnitude slower then using in-memory hash tables. See for example:

  • http://en.wikipedia.org/wiki/Caching

Hash maps are about speed, not persistence.

Take a look at the other uses in the Uses section of Hash table entry on Wikipedia:

  • http://en.wikipedia.org/wiki/Hash_table
like image 199
icyrock.com Avatar answered May 21 '26 22:05

icyrock.com



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!