Hello,
I have tried several encoder libraries with interrupts on ESP8266 : yours is the only one really working :) Thanks for sharing.
It is fast, accurate and simple. The speed idea is great.
I use it with NodeMCU ESP8266 and KY-40 encoder, with 100nf capacitors to help debounce.
One issue though : recent versions of Arduino ESP8266 Core require to add the ICACHE_RAM_ATTR macro for ISR functions. Otherwise, the code compiles but crashes.
The fix is quite simple in your examples : void ICACHE_RAM_ATTR rotaryInterrupt()
It is a good practice.
Al