Is it not cheaper to calculate the speed just every few seconds
Well it would be if your wheel was turning quickly, but I think the maximum speed it'll do is around 5 revs per second, so it's not a big deal.
IMO the problem is because it's not turning that fast, it's hard to accurately tell what speed it's going just by counting rotations. Suppose it is going round 5 times a second, and you test every 2 seconds - that means you'll only have counted to 10 - so the speed you're getting is only 10% accurate.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Well it would be if your wheel was turning quickly, but I think the maximum speed it'll do is around 5 revs per second, so it's not a big deal.
IMO the problem is because it's not turning that fast, it's hard to accurately tell what speed it's going just by counting rotations. Suppose it is going round 5 times a second, and you test every 2 seconds - that means you'll only have counted to 10 - so the speed you're getting is only 10% accurate.