-
Notifications
You must be signed in to change notification settings - Fork 30
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
Slow evaluation of H-polyhedron #216
Comments
I noticed that too, it seems to be #128 coming back. |
I'm observing the same very slow behavior on first print: julia> @time print(P); nothing
HalfSpace([1.0, 0.0], 0.5) ∩ HalfSpace([0.0, 1.0], 1.0) ∩ HalfSpace([-1.0, 0.0], 1.0) ∩ HalfSpace([0.0, -1.0], 0.5)
278.871120 seconds (649.93 M allocations: 45.619 GiB, 5.37% gc time)
julia> @time print(P); nothing
HalfSpace([1.0, 0.0], 0.5) ∩ HalfSpace([0.0, 1.0], 1.0) ∩ HalfSpace([-1.0, 0.0], 1.0) ∩ HalfSpace([0.0, -1.0], 0.5)
0.000704 seconds (125 allocations: 8.609 KiB) Interestingly, I've also observed this very slow behavior in a test set I'm writing that doesn't call print/show on any polyhedra. It takes ~5 minutes to run the fairly trivial tests; am working to try to isolate where the slowdown occurs in my code. |
The JuliaLang issue was closed. In Julia v1.7.2: julia> @time print(P); # first time
HalfSpace([1.0, 0.0], 0.5) ∩ HalfSpace([0.0, 1.0], 1.0) ∩ HalfSpace([-1.0, 0.0], 1.0) ∩ HalfSpace([0.0, -1.0], 0.5)
3.051096 seconds (7.38 M allocations: 428.249 MiB, 6.66% gc time, 99.96% compilation time)
julia> @time print(P); # second time
HalfSpace([1.0, 0.0], 0.5) ∩ HalfSpace([0.0, 1.0], 1.0) ∩ HalfSpace([-1.0, 0.0], 1.0) ∩ HalfSpace([0.0, -1.0], 0.5)
0.000186 seconds (103 allocations: 7.844 KiB) @blegat I think you can close all four related issues. |
Yes, glad this is fixed ! |
Is there anything that can be done to improve the first-time evaluation of polyhedra? Seven minutes is quite impressive. The construction itself is fast, but I guess the real computation is just delayed. Also note that in previous Julia versions this was considerably faster.
The text was updated successfully, but these errors were encountered: