If you are really addicted to music, of course it will have an impact.
But if you can enjoy music without being too addicted to it. If it doesn't affect the speed of your homework, of course it won't have much impact on your time. It depends on your anti-interference ability.