最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - compare performance MathJax vs MathQuill vs Katex - Stack Overflow

programmeradmin2浏览0评论

I'm looking for the fastest way to create formules inside a web page.

I thought I found the solution on jsperf in which MathQuill is by far the quickest. After I studied the tests a bit I noticed that the test for MathQuill runs in sync-mode, but it had an async setup. However, if you check the async checkbox, MathQuill will never fire the render event and thus the test will never complete.

So the questions is, is MathQuill async ? And is this is good performance test ? And is there maybe a better formula renderer ?

I'm looking for the fastest way to create formules inside a web page.

I thought I found the solution on jsperf in which MathQuill is by far the quickest. After I studied the tests a bit I noticed that the test for MathQuill runs in sync-mode, but it had an async setup. However, if you check the async checkbox, MathQuill will never fire the render event and thus the test will never complete.

So the questions is, is MathQuill async ? And is this is good performance test ? And is there maybe a better formula renderer ?

Share Improve this question asked Nov 30, 2014 at 19:27 Jeanluca ScaljeriJeanluca Scaljeri 29.1k65 gold badges231 silver badges379 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 13

So the questions is, is MathQuill async?

Based on the MathQuill source, it renders elements on document ready, synchronously, but it can also render elements on the fly, through the .mathquill() API. Technically though, you could call the method yourself and do it asynchronously.

And is this is good performance test?

I can't really speak to the usefulness of the test because it's unclear what you're trying to do, but I can provide you with some general background on the issue.

MathQuill's main strength is the ability to render math on the fly, with pretty, user-friendly textboxes. They themselves admit that it's not a good option for rendering static math, due to it's limited LaTeX support.

KaTeX, according to most benchmarks I've seen, is faster than MathJax, by a long shot. However, it has somewhat incomplete support for LaTeX, so that may be an issue.

MathJax is pretty slow, relative to the others, but it has almost complete support for LaTeX. If that's the price you're willing to pay, then go for it.

In short, choose MathQuill for editing, KaTeX for speed, for MathJax for comprehensiveness.

And is there maybe a better formula renderer?

These three are the only ones I've heard of. Based on a previous question, the only other option is jsMath, MathJax's predecessor. It's from 2004, so there's no reason that you should use it.

You can use mathlive for both editing and static TeX content.

发布评论

评论列表(0)

  1. 暂无评论