Open ziyi105 opened 2 years ago
I don’t think it’s a must, just when needed? If I remember correctly then prof said parallel should be used for big and complex tasks to reduce runtime, but preferably not for trivial task bc it’ll actually increase runtime for trivial ones (since parallel needs time to divide/conquer/etc)
It is not necessary to use it since it is used to process stream operation with HUGE input. For this module, I don't think we will use it and prof also mentioned that there is no good way to test this.
i think parallel is a useful tool when you are considering only stateless operations like adding one to every element. As mentioned by the others, it is not necessary but i think its worth exploring? since it is one of the promising features of stream I believe
When do we need to use .parallel(), is it a must to use it?