I am processing Big Data in a multithreading Java environment and i need a very efficient Sparse Vector Library that i can use. Any ideas? I just need it to have a super fast vector addition nothing more. The only operation i'm using is to add two sparse vectors but i'm going to do that very frequently on a shared hashtable. So each item in hashtable is . I do something like this:
anotherVector = initVector()
lock.acquire()
wordVector = hashtable.get(word)
wordVector = wordVector + anotherVector
hashtable.put(word, wordVector)
lock.release()
I need the addition task to be very fast so that i can release the whole hashtable resource as soon as possible for other threads.
BTW If there is any other ideas on how to implement this (e.g. using another data structure or another design) i'd be happy to hear about it. The only point is that i need it to be efficient for English Wikipedia.