Skip to content

Use lambdas and pack expansion to reduce template instantiations in action_dispatch

Jeff Trull requested to merge jaafar/graph-tool:improved-action-dispatch into master

This change produces significant reductions in compiler memory use (4.15GB to 2.81GB in my graph_assortativity testcase) and compiler runtime (180m to 168m overall, 206s to 188s in the testcase) by:

  1. Performing type iteration with parameter pack expansion where possible
  2. Testing the stored boost::any types sequentially instead of all at once (M+N instead of M*N operations)

I see no significant change in runtime with this approach, though it should in theory be an improvement.

Merge request reports