Skip to main content
Tweeted twitter.com/StackMma/status/855223936262565888
edited tags
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

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

enter image description here

but, I try my testing, it seems not exactly while ParallelMapParallelMap 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!

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!

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!

Source Link
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!