Example Code:HWThreadedHash (Multithreaded Hashtable), a Multithreaded hash table will improve your applications performance

December 30th, 2005

I have written a multithreaded hash table framework. You can put multiple tasks to do work for you with a simple “put” with a key,Then when it completes you can do a “get” to return the data worked on. The “get” will block until that requested thread is finished working.

The best way to use this is to first “put” all the work that you need to get done. Then after you can start doing a “get” on what ever data is needed.

I have used this framework to reduce a 6 minute batch process down to 13 seconds.By slicing up the work to do the data gathering first (puts) , and then data assembly second(gets).

Of course The slowest slice is the fastest your program is going to run.
Good luck…

HWThreadedHash.java
HWThread.java
HWThreadedHashExample.java


threads,multithread,performance,hashtable,hash, Java, programming, software, examples

Leave a Comment