more effectively erase events from vector for optimized dynamic algorithm