Skip to content
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

Replace expensive computations #1914

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Conversation

heshpdx
Copy link

@heshpdx heshpdx commented Sep 6, 2024

Replace hot FDIVs with FMULs through precomputing inverse values outside the loops. FDIVs are always more expensive than FMULs, although the amount varies per CPU microarchitecture.

This is a new commit, since I don't know how to revert a reverted commit.

Replace hot FDIVs with FMULs through precomputing inverse values
outside the loops. FDIVs are always more expensive than FMULs,
although the amount varies per CPU microarchitecture.
@jajhall jajhall merged commit a251c86 into ERGO-Code:consider-1911 Sep 7, 2024
110 checks passed
@heshpdx
Copy link
Author

heshpdx commented Sep 9, 2024

I added some more data here: #1911 (comment)

What are the next steps? Should I open a new PR to master?

@jajhall
Copy link
Sponsor Member

jajhall commented Sep 9, 2024

I added some more data here: #1911 (comment)

Noted, thanks. This looks good.

What are the next steps? Should I open a new PR to master?

No, I'll test the consider-1911 branch on my desktop now that I'm back in the UK

Note that we only push to master from latest, and then only when we create a release, so PRs should be made to latest.

@jajhall
Copy link
Sponsor Member

jajhall commented Sep 14, 2024

So, this gives a 2.5% performance improvement on the 32 Mittelmann LPs that HiGHS dual simplex can solve in 3600s.

I'm surprised, as I'd have expected compiler optimization to pre-compute the reciprocals.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants