1 Apr
2008
1 Apr
'08
5:28 p.m.
Unscientific profiling suggests that my IMP code is spending much of it time in check code, specifically checking that a particle contains a given attribute when fetching or setting its value. This check is not needed in C++ code that is not currently being debugged and it is extremely hard for the compiler to prove they are not needed. So I think the right solution is probably to replace the IMP_check in the C+ + code with an IMP_assert and wrap the methods with python code which checks that the attribute is there and throws an exception if it is not. There are probably a few other places like get_particle where this is also the case, but they don't seem to be bottlenecks at this point. Any thoughts?