Skip to content

Commit

Permalink
Use references when returning event lists.
Browse files Browse the repository at this point in the history
This gives a speed gain ~80%
Refs #10470
  • Loading branch information
martyngigg committed Nov 4, 2014
1 parent 83ccfe1 commit cb4841a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/MDAlgorithms/src/SXDMDNorm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ namespace Mantid

// get event vector
size_t wsIdx = d2m.find(detID)->second;
std::vector<DataObjects::WeightedEventNoTime> events = fluxEventWS->getEventList(wsIdx).getWeightedEventsNoTime();
const auto &events = fluxEventWS->getEventList(wsIdx).getWeightedEventsNoTime();
if(events.empty()) continue;
//get iterator to the first event that has momentum >= (*intersections.begin())[3]
auto eventStart = events.begin();
Expand Down

0 comments on commit cb4841a

Please sign in to comment.