Has anyone had the chance to test the compatibility of MacTeX on the new M1 Macs (Mac Mini, Macbook Air and Macbook Pro)? What is the performance like?

  • 6
    The current MacTeX is a universal binary and will run on both ARM and Intel Macs. Performance itself seems opinion based and not really on topic.
    – Alan Munn
    Nov 22 '20 at 20:41
  • 11
    I don't see how performance is opinion based. It can be measured and quantified. Nov 25 '20 at 12:06
  • 2
    My recollection (it's been a while since I read about it) is that out of the box MacTex is not universal binaries and that Mac's Rosetta is invoked to run the Intel binaries. But I believe the universal binaries are available and there are instructions to install them. (With some execeptions. I believe Asymptote was one of the exceptions.) See here tug.org/mactex/aboutarm.html
    – dedded
    Nov 25 '20 at 15:34
  • 1
    @JosephRedfern Benchmarking is objective in a sense, but depends a lot on the tests done, which is much more subjective. See Tips for choosing hardware for best LaTeX compile performance for some general performance issues relating to TeX. The new chips do seem to be fast pcmag.com/news/… so there might be some speedup. But I really don't know how useful this is as a question for the site. (Nobody has voted to close, however.)
    – Alan Munn
    Nov 25 '20 at 15:37
  • 1
    @AlanMunn So if I install mactex universal package on M1 Mac, and run “>>lualatex” from terminal, will the entire compile just use ARM binaries? Or is it that for some part of compile it would run ARM & another part it would use x86_64 (for library binary that’s not available as ARM)? I am glad this question wasn’t closed, performance is objective (if one controls the environment enough). Also MacTeX website suggests they used code base older than TeXlive 2020, does that mean M1 lualatex won’t support HarfBuzz. Can packages be updated to make that work?
    – reportaman
    Nov 26 '20 at 0:35

It's not as simple an answer, and I'll divide my answer in two parts...

Part-1: "Benchmark"

Upon researching internet for a latex benchmark and a site that maintains/publishes benchmark results, I found one: benchmark, and its corresponding results page. The steps are mentioned on the benchmark page. I repeated the same steps on Apple's new ARM based M1 Mac mini and my old Intel based MacBook Pro (relevant specs below), with all the following engines: latex, pdflatex, xelatex, and lualatex.

2020 Apple Silicon M1 Mac mini specs and results (using ARM binaries):

Mac mini M1, 2020
Chip Apple M1
Memory 16GB
macOS Big Sur 11.0.1

latex bench.tex  0.35s user 0.01s system 99% cpu 0.364 total
pdflatex bench.tex  0.53s user 0.02s system 99% cpu 0.549 total
xelatex bench.tex  0.72s user 0.04s system 107% cpu 0.714 total
lualatex bench.tex  1.24s user 0.03s system 99% cpu 1.279 total

2014 Intel based MacBook Pro specs and results:

MacbookPro Retina 13in, Mid 2014
Processor 2.6GHz Dual-core Intel Core i5
Memory 8GB 1600MHz DDR3
macOS Catalina 10.15.6

latex bench.tex  0.64s user 0.10s system 98% cpu 0.752 total
pdflatex bench.tex  1.08s user 0.15s system 99% cpu 1.237 total
xelatex bench.tex  1.60s user 0.34s system 110% cpu 1.769 total
lualatex bench.tex  3.00s user 0.41s system 99% cpu 3.431 total

As can be seen from the results page, the best performing latex numbers are from Intel's chip with specs:

Core i7-6700K, 4200MHz (Turbo), 8MB L3, Debian Jessie (64-bit)  0.200

At 0.20s it outperforms Apple M1 chip's 0.35s in this very short benchmark test. And that is Intel's discontinued 6th generation chip from Q'3 2015 as per their website. As of writing this post, Intel has recently released their 11th generation chips. If there is a consistent 10-20% improvement in performance of Intel chips per generation, one would guess that the latest 11th generation Intel chip should finish this test in around 0.10s (though one cannot really say without testing, and as can be seen in updates below, it seems unlikely).

UPDATE-1: We don't know if this 0.20s number is from a desktop with more big heat sink or from laptop. Laptop's with Intel CPUs are traditionally clocked with a lower base frequency, and can enter into "turbo" mode for much shorter periods of time. This is why the performance of Intel chip in top-of-the-line 16 inch MacBook Pro from 2019 reported in comment to this answer (look below) looks worse than a Q'3 2015 Intel chip. Also, from another article here, it doesn't look like Intel is able to pull a 10-20% better performance over the board (per "generation"), and to the contrary its newer generation CPU design seems to have done a tradeoff to improve some applications performance at the expense of others.

UPDATE-2: Here's a video that compares M1 chip with the latest Intel 11th generation chips in laptop chassis, and Intel's chip has lower performance in laptop chassis despite being its latest generation. With bigger heat sink, room, and fan in a desktop chassis it might sustain more of its turbo mode (even more with nitrogen cooling like in this video).

The latex benchmark (used in this answer) needs to be taken with a grain of salt though for a bunch of reasons: 1) we only have one test file, 2) test is too short considering speeds of modern processors (and length of time it takes for them to throttle down).

Intel processors in laptop chassis throttle down quite a lot within minutes as per videos I have seen comparing Cinebench repeat-loop performance tests; while Apple M1 gives never-ending consistent performance as it doesn't generate heat at a fast rate as Intel CPUs. Unless one does a really long test, one cannot know for sure.

While working, latex is not the only application I keep open & work on. So I wouldn't just look at latex command line time performance of some small test file as it doesn't tell the real story if I am looking for a primary work computer.

Part-2: "User experience"

First "huge" noticeable difference, and improvement in quality of life that I see from switching to M1 Mac is it is dead silent, dead cold, with snappy-fast user interface.

I have installed fresh copy of MacTeX/TeX Live on 2014 MacBook Pro every year since I have had that computer. It has been a consistently horrible experience that I preferred avoiding each time as the loud fans would be blowing hot air by the end of the process (downloading and installing 5/6GB of data, and doing package updates worth another GB). On the contrary, M1 Mac was dead silent, and the little air it blew (which wasn’t audible even close to the device) felt colder than my room temperature (other users on YouTube have reported a similar experience).

Power consumption As per this article on Anandtech (the most reputed source in CPU benchmarking industry), this device sips an idle power of just 4.2 Watts with peak 14.7 Watt under heavy Single thread workloads (latex runs single threaded). From the YouTube videos I have seen, Intels CPUs in laptop chassis easily operate at 35 (or above) watts for benchmarks where M1 remained well under 15W and gave comparable or better performance. This means more cost saving on electricity bills. Having such a low idle power (with wifi, and bluetooth on) means that it opens up other use cases like keeping it always on, and running CI/CD latex builds (among other things) on this device. The price point of $699 for base model of M1 Mac (8GB unified memory, and 256GB SSD) is also lucrative. Similar mini desktop "NUC" devices from Intel are more expensive.

Everything on software side (so far) in my testing looks fine, including programs that run under Rosetta 2. I did have initial bluetooth connectivity issue as also reported by some reviewers, though that doesn't really affect me as I use a Logitech Keyboard/Mouse setup that comes with its own tiny USB wireless dongle.

The Magic Trackpad is another user-interface/user-experience device that simply has no rival in industry, their keyboard is good too.

To wrap up, it depends on what you want to do with your next device. If you want to just get raw latex performance, then overclocking an Intel CPU with nitrogen cooling would give the best performance results. If you want a machine with good tradeoffs and comparable performance, M1 seems a better option.

  • 2
    For comparison's sake, on my 2019 MBP 16", I get latex bench 0.43s user 0.03s system 99% cpu 0.456 total with 2.6 GHz 6-Core Intel Core i7
    – Don Hosek
    Dec 13 '20 at 16:55
  • @DonHosek Thanks Don! Thats a good reference to have. I have referred readers to your comment in my UPDATE quotes above. It might be worthwhile to mention results for all four engines. If you would like to do that, feel free to edit the post with similar format that I use: machine specs followed by results of all four engines.
    – reportaman
    Dec 13 '20 at 23:48
  • 1
    Darwin 19.6.0, macOS 10.15.7, 2 GHz Quad-Core Intel Core i5, MacBook Pro (13-inch, 2020), TeX Live 2020: latex real 0m0.662s; xelatex real 0m1.299s; lualatex real 0m2.286s Dec 14 '20 at 0:51
  • 1
    It's interesting that xelatex and lualatex take so much longer than pdflatex.
    – Don Hosek
    Dec 14 '20 at 1:27
  • 1
    @JieFan Yes, check this: tug.org/mactex/aboutarm.html
    – reportaman
    Dec 15 '20 at 0:45

I tested bench.tex from reportamans answer on my MacBook Pro (13-inch, M1, 2020, 16 GB), after MacTeX got updated to Apple Silicon on April 1st 2021. I was a bit disappointed first.

Execution of

% latex bench
% bibtex bench
% latex bench
% time latex bench >> /dev/null

got me

0,36s user 0,04s system 80% cpu 0,503 total

Thats only a bit better than a 2012 i7 iMac, according to http://www.complang.tuwien.ac.at/franz/latex-bench

But I realized that there was only 80% CPU usage and there's no way of guaranteeing, that the task will be send to one of the four performance cores instead of the 4 efficiency cores.

My general subjective impression is: large projects like my Disseration compile in less than half the time, as on my previous i7 (2015 MacBook Pro). Without the fan spinning up. Quite frankly it's the best machine I've ever had.

%%%% EDIT %%%%

Comparing with the execution through rosetta 2 via command line environment:

env /usr/bin/arch -x86_64 time latex bench >> /dev/null

That yielded a runtime of 0,57 seconds.

    0.57 real         0.42 user         0.04 sys

Hence, native latex without rosetta runs 13% faster on the M1 in that scenario.

  • Maybe because when you were running it, there already were other high priority processes. If you really want to get highest performance, you will have to niceit at launch time. On macOS that requires superuser permissions. The safe way to do that is described in this answer: unix.stackexchange.com/a/72959/456507
    – reportaman
    May 15 at 7:58
  • Thanks for the tipp on nice. Never tried it on MacOS before. However, nicing does not change the CPU usage and only slightly decreases runtime: % sudo nice -n -20 su <user> -c "time latex bench" This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex) restricted \write18 enabled. [...] Output written on bench.dvi (35 pages, 220792 bytes). Transcript written on bench.log. latex bench 0,35s user 0,04s system 80% cpu 0,484 total
    – M. Eppel
    May 16 at 12:14

I've purchased a new M1 Macbook Air and Mac Mini and can confirm that build times for the same files as compared to our 2.3 Ghz 8-core i9 Macs are about twice as fast on the M1 Macbook's

  • 2
    Thanks, can you please add more exact spec of your i9 Mac machine like in the format that I use, also helpful would be the values for all four engines.
    – reportaman
    Dec 14 '20 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.