I want to to take samples from a population and then doing some operation on the samples. I want to program this in Python. Do I have to use multiprocessing, multithreading or something like map-reduce? And how can I test if it is really faster? On my Macbook-Air it is not faster when I use threading for simple print out, then if I do a normal loop.
Assuming you are talking about cPython, the implementation has something known as GIL (global interpreter lock), which doesn't let the threads to execute on multiple CPU cores, so threading library can't be actually parallel which can explain why your print out test wasn't faster. Assuming you understand your problem and you have correctly divided your problem for parallelism, multiprocessing library can help you run your problem in parallel.