I tested parallel collections on Scala vs simple collection, here is my code:
def parallelParse()
{
val adjs = wn.allSynsets(POS.ADJECTIVE).par
adjs.foreach(adj => {
parse(proc.mkDocument(adj.getGloss))
})
}
def serialParse()
{
val adjs = wn.allSynsets(POS.ADJECTIVE)
adjs.foreach(adj => {
parse(proc.mkDocument(adj.getGloss))
})
}
The parallel collection speed up about 3 times. What other option do I have in Scala to make it even faster in parallel, I would be happy to test them and put the results here.