-
Notifications
You must be signed in to change notification settings - Fork 25
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
Decrease allocations done #35
Comments
What kind of billiard |
It doesn't really matter. The allocations come from And so it should be, since all the methods are identical no matter the obstacles. What changes is only sings and numerical values... |
I guess the answer is simply "SVectors result in allocations" ? I cannot know for sure though. What I know for sure is that a lot of SVectors are created all the time during |
Check out this case: using DynamicalBilliards, BenchmarkTools
space = 3.0
r = 1.0
polygon_sides = 6
bth = billiard_polygon(polygon_sides, space/sqrt(3); setting = "periodic")
d = Disk([0.,0.], r)
push!(bth, d)
t = 1000.0
p = randominside(bth)
@btime evolve!(p, bth, t) I get
after having compiled once. PS: Sometimes in Sydney, the connection to github is down. I wanted to share this piece of code two days ago... |
Note that when using the benchmarking tools, any global variables should be preceded by a |
Oh ok. Thank you @dpsanders |
Closed in #72 |
A standard evolve call has at least 100,000 allocations even though everything is done through SVectors.
I do not know how or why this happens and also how to solve it.
Just do
to see what I mean.
The text was updated successfully, but these errors were encountered: