nus-cs2030 / 2223-s1

MIT License
1 stars 0 forks source link

Parallelism #263

Open ziyi105 opened 2 years ago

ziyi105 commented 2 years ago

When do we need to use .parallel(), is it a must to use it?

dohaduong commented 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)

mohddanesh commented 2 years ago

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.

euzhengxi commented 1 year ago

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