Inline small methods#1304
Conversation
jcoupey
left a comment
There was a problem hiding this comment.
Thanks for submitting a PR. The BBox::intersects function is indeed used in a hot path in order to filter out some moves from the local search. BBox::extend is probably not critical since it's "only" used upon route update after a move is picked. As for the rest, they're called when setting up the problem or formatting the solution so I would not expect any impact.
Did you have the opportunity to benchmark those changes?
After benchmarking with homberger_1000 and li_lim_1000 and seeing less than 1% percent improvement on average, I'm concluding that these changes are too insignificant to matter, will run these benchmarks beforehand next time I open a PR |
Issue
Several small struct methods in
structures(e.g.BBox) are on hot paths but defined in separate .cpp files,preventing inlining and impacting performance.
This PR inlines them and also inlines trivial methods (e.g.
ComputingTimes) that make their compilation units unnecessary.Tasks
structures.cppimplementationsCHANGELOG.md(remove if irrelevant)