Comparing performance of packages that work in different ways is always tricky. In this case, the speed comparisons between MathJax and KaTeX can be somewhat deceptive. For example, on the KaTeX home page there is an animation showing KaTeX and MathJax side-by-side on a rather large page from the
Mathematics StackExchange site. There are several caveats they don't discuss concerning the comparison, however. Because MathJax has a number of possible input and output formats and a variety of possible font choices, MathJax loads some of its code dynamically. That means it has to wait on network access to obtain those pieces. That delay is part of what is shown on the MathJax side of the comparison; because of KaTeX's more limited mission, it doesn't have to load pieces dynamically, and so doesn't have that network latency to contend with. Although the code for KaTeX also has to be loaded and involves some network delay, none of the timing comparisons I've seen take this into account -- they start the clock after the KaTeX has been loaded, and after MathJax.js (which is relatively small), but include the rest of MathJax's downloading time. While it is true that this is time that the user has to wait for the output, it is a bit of an apples to oranges comparison, especially if the original downloads are not included.
Another consideration is that MathJax updates the page in sections, so that when you have a large page with lots of math, the initial mathematics is typeset and displayed quickly so that you can be reading the page while the rest is processed. Because repainting the display is one of the slowest things the browser does, this means that MathJax causes more page refreshing (in order to get you results quickly), and so may the longer to get the entire page processed because it ha waited for periodic page updates. (The page author can control this by setting various MathJax parameters, but the defaults are set to give quick initial typesetting at the expense of longer finish times.) The animation on the KaTeX page shows a portion of the page that is 2/3 or so of the way through the long age, and MathJax has stopped to allow page updates several times along the way, a you can see but he jumps that are taking place. Had they shown the top of the page, MathJax would have shown its equations first (though taken longer to finish the page). This was a conscious trade-off that MathJax made, and represents a different approach to how the page should be updated. The position of the page in the animation gives a somewhat deceptive view of that.
Also to be considered is that the animation is now quite old. MathJax has improved its speed considerably since that animation was made. There are several different output formats for MathJax, and that animation uses the slowest and oldest one (the HTML-CSS output). That output was developed in the old days when we had to accommodate browsers as old as IE5, and that meant it did a lot of work you don't have to do now. For example, it would have to measure the sizes of some subexpressions because the browsers were not consistent enough in those days to get the same layout, and that measurement involved reflowing the page, which is expensive. In order be able to do those measurements, the MathJax web fonts had to be in place (otherwise the measurements would be for elements with the wrong fonts), so MathJax had to wait for those to load before it could proceed (more rating for network transfers). Note that in the animation KaTeX doesn't wait for the fonts; you will see the horizontal lines show up and then the font appears later.
Even in those days, I think MathJax's SVG output was available, which is roughly 5 times faster than the HTML-CSS output. The CommonHTML output format was not, but it is the replacement for MathJax's olde HTML-CSS output, and is comparable in speed to the SVG output even in version 2 of MathJax. It does not do any measuring and doesn't have to wait for the fonts, so it would make a more apples-to-apples comparison to KaTeX's approach.
Finally, one should note that at the time the animation was created, KaTeX didn't process all the TeX commands that MathJax does. At that time it did not do arrays or alignments or horizontal stretchy characters, or equation numbers, and so on. Although they picked a page where KaTeX could process most of the math, not everything even on that page was something KaTeX could display (e.g., the equation numbers and the alignments). So KaTeX got to skip some of the math layout that MathJax was actually performing, and that helped its timing as well. (They have since added most of those features, so would be able to process that page better, but perhaps more slowly, now.)
Those are some environmental issues that contribute to the differences that you see in the animation speeds. There are also some programmatic differences. As I mentioned above, MathJax has several input formats and several output formats. MathJax uses MathML as its internal format, so the input formats are all translated to MathML, and then the output renderers typeset that MathML format. That allows any input format to work with any output format because we go through a common intermediate format. But this does mean that there are several conversions steps, and it does mean that the complexities of MathML must be taken into account (for example, the way that stretchy delimiters around arrays work in MathML is rather different from how the do in TeX, and accommodating that takes some extra work).
KaTeX, on the other hand, implements the TeX pipeline described in Appendix G of the TeXBook. This is a simpler process that does not involve converting among different formats (it involes converting to TeX's internal math lists, which are designed to work nicely with TeX, and match its output approach much more readily than MathML does). Indeed, the TeX pipeline was what I implemented in MathJax's predecessor, jsMath, back in 2004. It is true that that can be done faster than what MathJax does (and jsMath was faster than Mathjax); but MathJax handles a wider range of formats, both for input and output, and that extra flexibility does come at a cost. Being able to handle MathML input was a key requirement of MathJax's sponsors, many of whom are commercial publishers with workflows that are based around MathML (even when their initial submissions are in TeX).
Another difference is that MathJax kept track of lots of bounding box information that KaTeX doesn't (and it turns out that this was a significant part of the processing times for MathJax). I haven't looked recently, but KaTeX initially only tracked an expressions height and depth (not width), whereas MathJax tracks height, depth, width, and extensions above, below, to the left, and to the right of the main bounding box (e.g., if you used \llap{} so that something extended to the left of the bounding box, MathJax tracked that). This was to handle SVG output as well as MathJax's zooming feature properly.
Finally, there have been many advanced in browsers since MathJax was initially developed. The advances in optimizing javascript performance in the browsers has been substantial, but the techniques needed to take advantage of them have changed over time as well. Some of the design decisions in MathJax made it hard for the browsers to optimize its code. In particular, MathJax would add and remove properties from objects at will, and that turns out to be very bad for optimization. KaTeX coming several years after MathJax, they were working with a more modern language, and so could take advantage of the changes that had occurred in that time. They also didn't have to accommodate older browsers like IE6.
With the MathJax rewrite for v3, we updated MathJax's infrastructure to bring the codebase into alignment with modern language features and programming paradigms. This means that MathJax gets a speed boost over v2 (what was already 5 times faster than the MathJax version to which KaTeX compared itself). We have also made it possible to do single-file downloads rather than v2's dynamic downloads (though both are possible), and don't do the "chunked" output any longer. All of these improve the speed with which MathJax's final output is produced.
I have not done any formal testing against KaTeX, but I suspect that the results with MathJax 3 are now comparable to that of KaTeX, even with the conversion to MathML and all the rest. The only page I know off that does a direct comparison with v3 is
this one, which has some problems. If you use their comparison, MathJax v3 is faster than KaTeX, but they have misconfigured MathJax so that in-line math isn't processed. But even if you double the MathJax time to accommodate that, it is still comparable to KaTeX according to that test. I can't vouch for how the timing is done.
So that is a long-winded explanation to say that the claim that KaTeX is the fastest math processing available may no longer be true.
Davide