-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Bezier-rs: Use nonzero winding order for Poisson-disk insideness test #1590
Conversation
I just did a performance profiling to compare the speed of the build link above and dev (so both running with release optimizations) and I'm seeing an average of 200ms on dev and 250ms on release with the same artwork where I'm dragging around an anchor point. This also fits with my observations that the framerate felt higher on dev before I ran the profiler. So unfortunately this seems to slow it down, not speed it up as was hoped. Which is odd, since just by glancing at the code it does look like you generally simplified things and I'd expect it to run faster. Do you think there are any ways to further optimize this? mI also wonder why my test with a ~50ms performance drop is in the opposite direction of your observed ~20ms perf improvement. |
That one point coming out on the left side of your image appears to be a "lucky" rare point that passes the two-direction check. I never managed to run into that during my tests but it's, of course, a possibility as you just found. I suppose it's now just a question of whether we want to trade performance for correctness (or, if we can figure out why it was faster on your machine but slower on mine and fix it for all, that'd be even better). |
7698ff8
to
aad7ef7
Compare
With your updates, it looks like my new test has this going from 700ms per frame (on master) down to 650ms per frame (in this branch), so your optimizations helped make this a net positive! And the switch to the nonzero fill rule is also appreciated since that lets us match the SVG default. Thanks for sticking with this and finding ways to make it even faster! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
I see ~20ms performance improvement but it may just be random error.