in reply to Articles matching entries
Algorithmically, one way of speeding up the process is to build an index. In your program, each (entry,feature) value is being accessed many times. How about building an index of values, with each value pointing to the number of (entry,feature) pairs with that value. Then for each (article, feature) value, you acess the (entry,feature) count directly, instead of computing it in a loop every time. The time taken to build the index will far outweigh the cost of all those eliminated loops.
-Mark
|
|---|