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

Redo some indexing inside FESystem. #14878

Merged
merged 1 commit into from Mar 13, 2023

Conversation

drwells
Copy link
Member

@drwells drwells commented Mar 13, 2023

This function takes up about 3% of the total runtime for an application I'm working on. We can reduce that cost by nearly 50% by moving some checks outside of loops and explicitly using std::copy(), which ultimately results in the compiler calling memcpy() (it can't do that on the present version due to aliasing).

source/fe/fe_system.cc Outdated Show resolved Hide resolved
@bangerth
Copy link
Member

OK otherwise!

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for me as well.

This function takes up about 3% of the total runtime for an application I'm
working on. We can reduce that cost by nearly 50% by moving some checks outside
of loops and explicitly using std::copy(), which assumes the inputs are not
aliased, rather than for-loops.
@kronbichler kronbichler merged commit c19c2dc into dealii:master Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants