Skip to content

Speed up GenEvent::attribute_names

Peter Onyisi requested to merge ponyisi/HepMC3:speedup-attribute-names into master

Profiling indicated GenEvent::attribute_names was taking ~85% of runtime when reading a HepMC2 ASCII file. Replacing a linear-time search with a log-time search speeds up the function 150x in my tests.

Merge request reports