Smooth scrolling is already implemented correctly in the browser. Your implementation is just a hack that hijacks the normal behaviour a user is accustomed to and just gives back a version that just feels wrong to interact with, even without performance issues.