Ah, some excellent points; thanks Hans! I’ll do some tests with --silent and --profile. And you’re right; my tests aren’t rigorous enough because I sometimes compile from within emacs. I don’t have a modern Mac anymore - I had to return my sweet MacBook this fall when I took retirement. But I suspect that I will have to replace this iMac one of these days. Which is a pity because I enjoyed running linux natively, which is still a hassle on the apple silicon machines. But I remember that the M2 Mac felt a lot faster - I should have kept the logs from this laptop.
All best Thomas > On 30. Oct 2026, at 09:42, Hans Hagen via ntg-context <[email protected]> > wrote: > > Actually the linux binaries migh not even be the fastest possible because we > compile on the build with an old compiler and setup (will be updates soon) > while on e.g. my linux box it compiles more efficient and also does link time > optimization. We mostly test linux on Mikaels chrome book where a 300 page > math book with some 3K formulas takes 5 sec (that we want to bring down to 3 > sec so we have some work todo). > > Factors that influence a run are the console (use --silent to test) and apple > is not the fastest there. Then there is the file system but that is unlikely > to be a cause. You use the same cpu so the cpu cache is not relevant. Running > from a editor can slow down too (vscode is slow for instance). > > What might make a difference is that the intel compilation might not use the > mimalloc route so then we have a slower lua and xml is pretty much a lot of > lua; tex manages its own memory so that has little influence there. > > On my windows machine, when I compile on wsl it actually can be faster than > on windows (usually with a vm it relates to the host doing the file stuff so > a bit more multiple core). Processing the test suite in wsl takes 240 sec vs > 400 sec on windows which is due to different 'context switching' when > processing parallel on 4/8 cores (--parallel etc). A nice test is making a > format (some 2+ sec on windows, and 1.5+ on wsl). > > Processing the 750 page luametatex manual is a nice test case: 15 sec on my > windows machine (from scite, i.e. fast console). On a rpi 5 it's 1.5 times > slower (one can compile locally to get better bins, and profiling might also > boost a bit). On the arduino uno that manual takes 6 times what the laptop > does. And wsl needs 12 sec. (Of course a modern machine will do the job in 5 > sec but the fact that I can't afford a new one makes me invest in speedign op > the engine etc. So a slow machine pays off in terms of trying to speed up.) > > An arm mac is of coure faster than your intel, Keiths old M1 is about 1.2 > times faster than my old xeon 1505m laptop. Can you test a modren mac? > > When you run a file with --profile you get an extra log file where you can > see where lua spends time. Maybe that gives a clue. > > Hans ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
