-
Notifications
You must be signed in to change notification settings - Fork 1
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
Benchmark sympy implementation #27
Comments
#29 implements a similar benchmark under
Note:
UPDATE: See #69 for a correction to these numbers. |
that is ridiculously fast. I am jealous |
That's also what makes me doubt whether this is computing things correctly 😅 But creating those 20 plots (intensity, |
We can cut the number of interesting plots. I think we do not need to look at the individial chains anymore for the final results. For the number of decay chains, I get 25 by counting the production couplings. |
I found one problem with my implementation. Actually, my customary stuctures for masses, spins and helicity were not interfaced correctly. This piece of code caused x10 slow down import Base:getproperty
function getproperty(two_js::ThreeBodySpins, sym::Symbol)
(sym in fieldnames(ThreeBodySpins)) && return getfield(two_js, sym)
(sym == :two_j1 || sym == :two_λ1) && return getfield(two_js, :two_h1)
(sym == :two_j2 || sym == :two_λ2) && return getfield(two_js, :two_h2)
(sym == :two_j3 || sym == :two_λ3) && return getfield(two_js, :two_h3)
(sym == :two_j0 || sym == :two_λ0) && return getfield(two_js, :two_h0)
error("no property $(sym)")
end The intensity plot on my laptop takes 1s. Compare to your 1ms, haha |
Nice! That agrees more with the corrected benchmarks from #69. JAX seems to do some kind of fancy nested for repeated calls, but for a first call, it's apparently also about one second. What's weird though, is how JAX scales. According to #69, computing the intensity for 10^7 events takes around 5.3s. |
Here are figures from julia implementation for the reference
amplitude
for the 25 chains of the default model on a random point in the phase space takes~1.2ms
100_000
points on 8 threads takes 130 secs.The text was updated successfully, but these errors were encountered: