-
Notifications
You must be signed in to change notification settings - Fork 511
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
Some additional Eigen porting #432
Conversation
Have you seen @Evil-Spirit's Eigen port in #225? I was planning to merge that today, actually... |
Regardless of anything else, you really shouldn't drop the entire source of Eigen right into this repository. Use https://github.com/eigenteam/eigen-git-mirror as a submodule. |
oops, no, I hadn't... Yeah, my bad on the dropping the source in. Not sure why I did that last year. When I went through and fixed it, it was just easier to drop a new one instead of adding the submodule. |
Rebased this (along with fixing the extlib thing, now using a submodule). Looked at the stuff by evil-spirit, looks cool, but don't have the understanding of the solver innards to safely rebase it without breaking things. |
So I shall look into this eventually, but I definitely wouldn't block 3.0 on it. |
@rpavlik No problem, 3.0 is imminent. Soon after that I'll probably try to merge the evil spirit solver improvements that don't involve Eigen and then there will be plenty of time for the rest. BTW I wanted to email you but can't find contact info. Feel free to ping me - same ID at g mail. |
dfb96de
to
3f09eaf
Compare
OK, updated this. |
I honestly don't know enough about the solver to give any helpful feedback. I am hoping this can be combined with Evil-Spirit's changes, but am afraid this will make the merge of those changes harder? (I didn't try or look at it extensively though) I'll probably give a stab at combining the 2 Eigen PR's soon. |
@vespakoen don't. @rpavlik did already! #386 (comment) Better review his. |
OK, I have updated this to contain the un-merged commits. These are all pretty simple replacements, I think most of these profiled as a "problem" back in the day when I did them. |
OK, so using the benchmark tool (nice! I don't remember that being there previously) and a "normal" model for me, this reduces the time to load from 0.185s to 0.165s. We did def. pick up a regression, probably in that openmp jacobian, since previous master here gave me 0.161, but I'm bisecting now. |
ok, now I can't repro the 0.185. Trying a release openmp build now... |
Turns out this introduces a small performance regression. This reverts commit 985e4fb.
Yeah I should just not do performance testing on a laptop on battery I guess. Rebased on top of #1183 to avoid that regression. Anyway, I think these are at least performance neutral compared to #1183 as far as I can tell, possibly a performance improvement. They were a performance improvement back in pre-3.0, but even if they're just a readability improvement: Eigen allows pretty clear, concise expressions which is lovely. |
@rpavlik a while back, @ruevs made changes to our vector class adding C++ 11 style return { ... } to the methods. That was a solid win in performance. I'm not in favor of adding Eigen functions in place of ours unless there is a clear advantage. OTOH the faster this gets, the more significant each improvement gets! So I guess I'm saying to retest for performance wins when adding Eigen functions. |
I don't have data for these anymore, but they made a visible interactive improvement while editing as well as a profiling improvement back when I wrote these in 2016. Since then I've changed jobs, had another kid, done many other things, and rebased this countless times, so I no longer have that data. But I clearly remember both the min altitude and tangents at being big bottlenecks at that time. I imagine I was using tangent arcs (fillets) which were not used in my test model yesterday because the whole thing was round and because I basically learned they don't work well in stock Solvespace. If you don't want to merge these that's fine, but please close this pr then so I stop spending time rebasing it and trying to submit it for review and integration, I'll just carry it on a local tree. |
I'll close it then. I believe there is more improvement in ratpoly to be had without introducing a new API. |
Just putting this out there instead of letting it fester, totally understand if you aren't interested in it. I originally made this to attack some of the biggest time-sinks in profiling some pathological cases. In my testing now, it is about equal to 10% faster than master when running the test suite in relwithdebinfo mode. The downside of the Eigen magic is that a pure debug build is slower (4 seconds instead of 3).
There's more use of Eigen stuff that could be done, this was just what I had. Let me know if there's any interest so I can stop forward-porting it if it's not useful :D (I haven't had to use those pathological files in a while anyway, so the itch is not as strong.)