Might this help?
using Base.Threads
function ft(n=100_000_000)
rt = zeros(nthreads())
@threads for i in 0:n-1
@inbounds rt[threadid()] += sin(i)
end
sum(rt)
end
No idea the state of multi-threading on Numba… although I presume it is off by default & thus doesn’t explain the difference.