Performance improvement

Changed the stl::map<>::operator[] access to be outside the loop
over pulse samples, avoiding an expensive lookup for each pulse
sample.