-
Notifications
You must be signed in to change notification settings - Fork 913
Improved look-up table query scaling with variable count #2214
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
Conversation
…ng comparisons, improving efficiency
|
You may want to remove the string based interface since it's known to be inneficient. |
When replacing the string-based with index-based look-up methods, the performance improves substantially. The figure below shows the average measured evaluation time (measured with chrono library) vs the number of output variables. It's clear that using index-based look-up methods results in reduced query time, as well as improved scaling. |
bigfooted
left a comment
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.
Thanks Evert, it looks good to me, Also nice improvement in speed.

Proposed Changes
The
CLookUpTableclass allows for the fast interpolation of unstructured 2D data.It was found that the query time of this class scaled significantly with the number of output variables, indicating inefficiencies in the query process.
These inefficiencies came from string comparison routines in the
GetIndexOfVarfunction of theCLookUpTableclass. By implementing overloaded instances of the look-up functions which retrieve data from data indices directly, the query time efficiency scaling was significantly improved.Also reduced duplicate code within the
CLookUpTableclass.PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.