Hello all,
I have a question about parallelization:
I have two datasets. Dataset1 has m rows and k columns, Dataset2 has n rows and k columns.(m > n) My program reads those datasets from files and store them in the memory. The task is to take each instance of Dataset1(let's call this query instance) and compare with all instances of Dataset2.
Now my question is that:
- (Option1)Should I partition the Dataset2 into x number of partitions and assign those partitions to the x number of worker threads in each query(this implies that, comparison with query instance in Dataset2) of Dataset1 or
- (Option2)Should I take x number of instances from Dataset 1 , assign x number of worker threads to query Dataset2 simultaneously.
Which one would be more efficient? //BTW, I'm using PThreads library at the moment.