jqMath & MathJax Timing Data

I recreated some MathJax Timing Data on my computer, and also ran the same tests in jqMath. For each test, I emptied the brower’s cache, then ran the test, and then revisited (not reloaded) the page to run the test again, presumably getting items from the browser’s cache on the second run. I used an iMac running Mac OS 10.5.8, with a 2.66 GHz Intel Core 2 Duo CPU, and 4 GB of 1067 MHz DDR3 RAM. For Internet Explorer, I used Parallels Desktop 4 virtualization software, Windows Vista Business SP2 32-bit, and 1 GB of RAM. I rebooted each machine before starting. The browsers were Chrome 10.0.648.204 and Internet Explorer 8.0.6001.19019 (without using a MathPlayer plugin). All times are in milliseconds. For more information on these tests, and the columns in the MathJax table below, see the MathJax Timing Data page.

MathJax
Chrome 10Internet Explorer 8
EquationsTotalProcessReprocessRevisit TotalProcessReprocess TotalProcessReprocessRevisit TotalProcessReprocess
10 285719341598492601606719467276622411382796
30 424527366891955809693 15994124162672702042672688
100 16588877670361473572787021 740665244218609675164901518407
jqMath
Chrome 10Internet Explorer 8
Equations LoadConvertL+C/MathJaxRevisit LoadConvertL+C/MathJax LoadConvertL+C/MathJaxRevisit LoadConvertL+C/MathJax
10 598306280.237324970.14 7761729480.16622032650.18
30 383714540.1374771510.12 73553112660.10785856630.15
100 4642276910.07742122860.04 593162522180.0494183719310.04

The /MathJax columns give $(\Load + \Convert)_\jqMath ∕ (\Total - \Reprocess)_\MathJax$, the approximate ratio of the jqMath and MathJax required times. As you can see, jqMath was roughly 10 times faster than MathJax (but see the updated numbers below). This is because MathJax actually measures and formats all the mathematical expressions and subexpressions itself, whereas jqMath just converts them to simple HTML and CSS, which is then formatted by the browser’s native code.


3/27/13 update: I re-ran the tests in Chrome 26 on the same machine as before, but now using Mac OS 10.6.8, MathJax 2.1, and jqMath 0.4.0.

MathJax 2.1
Chrome 26
EquationsTotalProcessReprocessRevisit TotalProcessReprocess
10 1169699143478223156
30 1329780360920483384
100 383122861348297715191362
jqMath 0.4.0
Chrome 26
Equations LoadConvertL+C/MathJaxRevisit LoadConvertL+C/MathJax
10 465395040.493436700.22
30 359744330.451665810.15
100 4991836820.27241932170.13

MathJax has been sped up significantly, so jqMath is now roughly 2 to 8 times faster than MathJax, averaging perhaps 5 times faster for repeated use. Of course, these times should be even faster in a browser with MathML implemented natively.