-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallellization #216
Comments
Some preliminary results, starting julia with 8 threads: using DelayEmbeddings, Entropies
m, τ, N = 7, 1, 1000000
est = SymbolicPermutation(; m, τ)
x = Dataset(rand(N, m)) # timeseries example
πs_ts = zeros(Int, N); # length must match length of `x`;
using BenchmarkTools, Test
probabilities!(πs_ts, est, x);
probabilities_parallel!(πs_ts, est, x);
probabilities_parallel_batch!(πs_ts, est, x);
@btime pn = probabilities!($πs_ts, $est, $x) # No threads
@btime pp = probabilities_parallel!($πs_ts, $est, $x) # Threads.@threads
@btime pb = probabilities_parallel_batch!($πs_ts, $est, $x) # Polyester.@batch, no configuration
> 85.572 ms (7 allocations: 7.71 MiB)
> 44.202 ms (49 allocations: 4.36 KiB)
> 37.254 ms (1 allocation: 48 bytes It definitely seems that there is some performance gains to be made here. Some more sensitivity analyses are needed before settling on anything. |
what's the code though |
and why does the pure |
Notice that you cant thread without care. The method uses the internal pre-allocated |
In the following discussion, the issue of parallellization came up. This is a reminder of that.
Originally posted by @Datseris in #213 (comment)
Things to think about:
The text was updated successfully, but these errors were encountered: