-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Description
Describe the bug
When calling cvm::position_distance, it has to call a virtual function from the proxy, which introduces huge CPU performance penalty. In my initial tests with selfCoordNum,
- With manually inline the logic of
cvm::position_distanceintocompute_pair_coordnum, the simulation speed is about 89 ns/day; - With the current code using virtual function for
cvm::position_distance, the simulation speed is about 67.2 ns/day;
In other words, the performance loss of using virtual function in cvm::position_distance is about 22%.
Back-end (i.e. package that uses Colvars)
All
Colvars version
All
Expected behavior
Colvars should be refactored to provide is own function for wrapping, and this wrapping function should be able for compilers to inline.
Output log
N/A
Reactions are currently unavailable