This thread got a bit off-topic, but I figured I would try the tests in this comment. I have an MSI laptop that is a few years old now:
julia> versioninfo()
Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = "C:\Users\peter\AppData\Local\Programs\Microsoft VS Code\Code.exe"
JULIA_NUM_THREADS = 6
with N = 10^8
julia> @btime sequential_add!($y, $x)
13.872 s (0 allocations: 0 bytes)
julia> @btime parallel_add!($y, $x)
4.312 s (33 allocations: 4.98 KiB)
with N = 2^27
julia> @btime sequential_add!($y, $x)
21.121 s (0 allocations: 0 bytes)
julia> @btime parallel_add!($y, $x)
6.310 s (34 allocations: 5.00 KiB)