The app ‘listens’ for location data coming from the GPS receiver, which in turn depends on getting enough signals from the GPS satellite array to ‘fix’ your location. This location data contains the current position (latitude and longitude), speed, heading, altitude etc. It then translates this data into your required unit (MPH/miles etc) and displays it using images.
That’s essentially all the app does and therefore is totally at the mercy of the quality and accuracy of the GPS data it receives. It doesn’t perform any fancy maths to try to reduce the lag that is always present when calculating speed as I’m not confident that this would work reliably or be of benefit to every device.