Improve performance --> Replace impulse.sh with impulse.cpp