Update src/feature_detection.cpp

reduced number of loops for faster benchmarking