In MariaDB there seem to be no major (>5%) bottlenecks for CPU bound workloads. However there's a whole bunch of more or less easily fixable minor things that waste inexcusable amount of time. Among those:
- one-line virtual methods that can't be inlined
- simple functions defined in source file that can't be inlined
- abuse of likely()/unlikely() (likely in InnoDB, PFS)
- added (sometimes complex) conditions (PFS, WSREP, PROFILING)
- frequent calls of pthread_getspecific() (InnoDB, parser, optimizer)
See linked issues for details.