When to parallelize the code?