-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
As discovered in https://discourse.julialang.org/t/help-with-binary-trees-benchmark-games-example/37307/13
❯ hyperfine -w1 "julia -p4 -E 'using Distributed; nprocs()'" "julia -E 'using Distributed; addprocs(); nprocs()'"
Benchmark JuliaLang/julia#1: julia -p4 -E 'using Distributed; nprocs()'
Time (mean ± σ): 2.040 s ± 0.010 s [User: 5.563 s, System: 0.773 s]
Range (min … max): 2.024 s … 2.054 s 10 runs
Benchmark JuliaLang/julia#2: julia -E 'using Distributed; addprocs(); nprocs()'
Time (mean ± σ): 1.785 s ± 0.014 s [User: 5.337 s, System: 0.756 s]
Range (min … max): 1.765 s … 1.816 s 10 runs
Summary
'julia -E 'using Distributed; addprocs(); nprocs()'' ran
1.14 ± 0.01 times faster than 'julia -p4 -E 'using Distributed; nprocs()''
Is there a reason spawning the extra processes with addprocs() is necessarily faster than spawning them with -p command-line argument?
rejuvyesh and PallHaraldsson
Metadata
Metadata
Assignees
Labels
No labels