Actually the Linux kernel is rather fast if used right.
The Mikrotik CCR1036 series routers have a 36 core tile CPU with each core running at 1.2ghz it can cram out 15 million pps. https://www.youtube.com/watch?v=UNwxAjJ4V4A
RouterOS is based on the Linux kernel see https://en.wikipedia.org/wiki/MikroTik