QMK contributor u/x34l explains different debounce algorithms and shares some of his measurements.
KBD.news Published November 4, 2020
54 people keep this blog alive for 150,000 readers. Want to join? Thanks to: Micah Alpern, Anatolii Smolianinov, and Gordon Diggs.
In his post, fellow Redditor x34l sheds some light on debounce algorithms.
Hi, I'm one of the (many) devs who did debouncing code at some point for QMK – x34l.
The default debounce algorithm has some latency repercussions meaning you can get some nasty 30ms+ response times sometimes while typing.
There are a few algorithms available (eager-pr, eager-pk) that reduce latency by 5-10ms.
Do note that to get the best algorithm, you need to find out your scan rate.
If it's below 500, try eager-pr, and if its above 800, try eager-pk.
Allegedly, some keyboards such as ErgodoxEZ were plagued by latency in the default algorithm, and an eager-pr/eager-pk style debounce reduced latency by a noticeable amount.