-
Notifications
You must be signed in to change notification settings - Fork 284
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
Refactor FEInterface to speed up dof_indices? #101
Comments
On Fri, 26 Apr 2013, Benjamin S. Kirk wrote:
Sounds great! It'll be interesting to figure out how to benchmark the
Isn't "turn switch statements into branch tables" a common compiler
I want to support old xdr/xda restart files indefinitely, so that's I'd like us to move to something more extensible for a restart file
I despised the mass of switches in FEInterface until roughly last templated virtual functions in C++.Roy |
Yaagh. I thought maybe the email-mangling that you guys had noticed had something to do with HTML email, but the quote characters and paragraph breaks in my alpine output just got shredded there. |
It is, but when we have a double switch that then makes a function call to another double switch in a different translation unit and don't usually do inter-procedural optimization I can't imagine a compiler in the world that could do that too efficiently... As for the restart bit - yes, probably worth its own thread. In the meantime I can have a simple int->string mapping to handle old restart files. |
On Fri, Apr 26, 2013 at 1:20 PM, roystgnr notifications@github.com wrote:
I will be able to tell you how much of a speed up it is... we spend a |
I was looking into the DofMap::dof_indices()function to see what I might do to speed it up.
To see just how expensive e.g. FEInterface::n_dofs_at_node() is, I actually had to run the code through the preprocessor to see how all the macros expanded.
What I see is that it becomes a double switch which dispatches to another double switch, and it gets called obviously for each node on the element.
I was thinking about making the current n_dof_at_node() a private member of FEInterface, and using it to build up static arrays, say
but to do this right, it will probably involve cleaning up our FE_FAMILY enum so it is packed, which means writing a string or something instead of a number to the restart files.
@roystgnr, @jwpeterson, @pbauman, @friedmud - Thoughts on this or on the broader issue of FEInterface altogether?
-Ben
The text was updated successfully, but these errors were encountered: