src: optimize method matching
src: tail call in discard_ws