[Tex/LaTex] Apple Silicon M1 Mac compatibility for MacTeX, and performance

macmactexperformance

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?

Best Answer

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.

Related Question