Skip to main content
1 of 2
Jerry
  • 2.5k
  • 10
  • 17

ParallelMap vs Map performance comparsion

The ParallelMap claims doing map faster than the normal Map, and I checked the demo does as the document describing.

enter image description here

but, I try my testing, it seems not exactly while ParallelMap excuting with 8 kernels.

Map[(N@Sin[#]) &, Range[10000000]] // AbsoluteTiming
ParallelMap[(N@Sin[#])&,Range[10000000]]//AbsoluteTiming

the output could be like this. enter image description here

Is there bug with my testing code? Thanks!

Jerry
  • 2.5k
  • 10
  • 17