* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-18 18:56 ` Shiv Shankar Dayal
@ 2024-01-18 19:08 ` Mikael Sundqvist
2024-01-18 19:31 ` Hans Hagen
2024-01-18 22:15 ` Bruce Horrocks
2 siblings, 0 replies; 19+ messages in thread
From: Mikael Sundqvist @ 2024-01-18 19:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
On Thu, Jan 18, 2024 at 7:58 PM Shiv Shankar Dayal
<shivshankar.dayal@gmail.com> wrote:
>
>
>
>
>> In comparison to LaTeX with LuaHBTeX, ConTeXt with LuaMetaTeX is
>> lightning fast.
>>
>> pdfTeX is 8bit, and Knuth’s plain TeX is very low level – for a fairer
>> comparison, try the TeXbook on LuaMetaTeX (I don’t know if “plain” works
>> though).
>
>
> I understand that why it is slow, but the problem is that the difference is too high.
> My book has lots of math, so perhaps that is the reason.
>
For what it is worth, I have a math book (lots of math and references
back and forth and some figures) and the 300 pages compiles in around
10s, so 30 pages/s. I don't have too much to compare with, and that is
a bit slower than your 40 pages/s (but 40*30 is 1200 and not 450), but
I consider that pretty fast.
One thing you can try is \enableexperiments[fonts.compact] (as it
sounds, it is still experimental).
Also, if you do not provide any example code, it will be difficult for
people to guess how _you_ can speed up your compilation (if at all).
/Mikael
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-18 18:56 ` Shiv Shankar Dayal
2024-01-18 19:08 ` Mikael Sundqvist
@ 2024-01-18 19:31 ` Hans Hagen
2024-01-18 23:34 ` Aditya Mahajan
2024-01-18 22:15 ` Bruce Horrocks
2 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2024-01-18 19:31 UTC (permalink / raw)
To: ntg-context
On 1/18/2024 7:56 PM, Shiv Shankar Dayal wrote:
>
>
>
> In comparison to LaTeX with LuaHBTeX, ConTeXt with LuaMetaTeX is
> lightning fast.
>
> pdfTeX is 8bit, and Knuth’s plain TeX is very low level – for a fairer
> comparison, try the TeXbook on LuaMetaTeX (I don’t know if “plain”
> works
> though).
>
> I understand that why it is slow, but the problem is that the difference
> is too high.
> My book has lots of math, so perhaps that is the reason.
You can run the texbook with \tracingall and see what actually happens.
The texbook uses plain tex (very lightweight) with a dedicated style
(also lightweight). On the contrary context uses layers of abstraction,
a more complex font, math, structure, page etc etc etc sytstem.
In fact, plain tex had to be as it is because otherwise it would take
ages to process teh texbook. On a pc one could see the page numbers
crawl so in the end wr're quite okay nowadays.
If you run context with \tracingall you'll see that more goes on.
For me 40 pps sounds not that bad. If you use only text you can get to
500 pps but that's not realistic. Maybe your style is suboptimal.
Also, open type fonts, opentype math, unicode, color, etc etc comes at a
price. And, compared to pdftex, in most cases luametatex is faster on
documents of average complexity. If you also use xml and/or metapost you
migh tbe dragged down to a few pages per second while lmtx doesn't
suffer much.
Anyway, if you think it can be made faster you can always post code to
this list that identifies bottlenecks.
Of course we'll never be as fast as (pure) plain tex (no layers added)
or latex (which often is advocated as faster than context).
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-18 19:31 ` Hans Hagen
@ 2024-01-18 23:34 ` Aditya Mahajan
2024-01-19 0:09 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 19+ messages in thread
From: Aditya Mahajan @ 2024-01-18 23:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 18 Jan 2024, Hans Hagen wrote:
> Of course we'll never be as fast as (pure) plain tex (no layers added) or
> latex (which often is advocated as faster than context).
I was curious, so did a quick experiment: typeset \input knuth 500 times. Here are the results:
pdflatex: 547 pages/sec
lualatex: 308 pages/sec
MKIV: 130 pages/sec
LMTX: 147 pages/sec
Interestingly, pdflatex, lualatex, and MkIV all generated pdf with 1112 pages, while LMTX generated a pdf with 1250 pages. Both MkIV and LMTX take the same time to run (8.5 sec) but LMTX generates more pages so it is faster.
Of course, this is a meaningless experiment from a practical point of view as a 1000 page document will be more complex than just text.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-18 23:34 ` Aditya Mahajan
@ 2024-01-19 0:09 ` Hans Hagen via ntg-context
2024-01-19 0:33 ` Aditya Mahajan
0 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen via ntg-context @ 2024-01-19 0:09 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 1/19/2024 12:34 AM, Aditya Mahajan wrote:
> On Thu, 18 Jan 2024, Hans Hagen wrote:
>
>> Of course we'll never be as fast as (pure) plain tex (no layers added) or
>> latex (which often is advocated as faster than context).
>
> I was curious, so did a quick experiment: typeset \input knuth 500 times. Here are the results:
>
> pdflatex: 547 pages/sec
> lualatex: 308 pages/sec
opentype or type 1 ?
> MKIV: 130 pages/sec
> LMTX: 147 pages/sec
that is weird as lmtx is always faster here (we loose some 15% on the
backend compared to luatex, maybe even more, but we gain back quite a
bit elsewhere for various reasons)
> Interestingly, pdflatex, lualatex, and MkIV all generated pdf with 1112 pages, while LMTX generated a pdf with 1250 pages. Both MkIV and LMTX take the same time to run (8.5 sec) but LMTX generates more pages so it is faster.
puzzling
> Of course, this is a meaningless experiment from a practical point of view as a 1000 page document will be more complex than just text.
% engine=pdftex 1.2
% engine=luatmetatex 1.6
% engine=luatex 1.8
% engine=xetex 2.4
\starttext
\dorecurse{500} {
\input knuth \par
}
\stoptext
125 pages, so how does your test file look
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-19 0:09 ` Hans Hagen via ntg-context
@ 2024-01-19 0:33 ` Aditya Mahajan
2024-01-19 8:51 ` Hans Hagen
0 siblings, 1 reply; 19+ messages in thread
From: Aditya Mahajan @ 2024-01-19 0:33 UTC (permalink / raw)
To: Hans Hagen via ntg-context
On Fri, 19 Jan 2024, Hans Hagen via ntg-context wrote:
> On 1/19/2024 12:34 AM, Aditya Mahajan wrote:
> > On Thu, 18 Jan 2024, Hans Hagen wrote:
> >
> >> Of course we'll never be as fast as (pure) plain tex (no layers added) or
> >> latex (which often is advocated as faster than context).
> >
> > I was curious, so did a quick experiment: typeset \input knuth 500 times.
> > Here are the results:
> >
> > pdflatex: 547 pages/sec
> > lualatex: 308 pages/sec
>
> opentype or type 1 ?
type 1. I did not change anything in the defaults. I'll try to figure out how to load opentype fonts in latex, and test lualatex.
> > MKIV: 130 pages/sec
> > LMTX: 147 pages/sec
>
> that is weird as lmtx is always faster here (we loose some 15% on the backend
> compared to luatex, maybe even more, but we gain back quite a bit elsewhere
> for various reasons)
LMTX is faster for me as well.
> > Interestingly, pdflatex, lualatex, and MkIV all generated pdf with 1112
> > pages, while LMTX generated a pdf with 1250 pages. Both MkIV and LMTX take
> > the same time to run (8.5 sec) but LMTX generates more pages so it is
> > faster.
>
> puzzling
>
> > Of course, this is a meaningless experiment from a practical point of view
> > as a 1000 page document will be more complex than just text.
> % engine=pdftex 1.2
> % engine=luatmetatex 1.6
> % engine=luatex 1.8
> % engine=xetex 2.4
>
> \starttext
>
> \dorecurse{500} {
> \input knuth \par
> }
>
> \stoptext
>
> 125 pages, so how does your test file look
5000 recursions (not 500, sorry about that).
\starttext
\dorecurse{5000}{\ReadFile{knuth}}
\stoptext
I'll send you the PDFs offlist.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-18 18:56 ` Shiv Shankar Dayal
2024-01-18 19:08 ` Mikael Sundqvist
2024-01-18 19:31 ` Hans Hagen
@ 2024-01-18 22:15 ` Bruce Horrocks
2024-01-19 9:31 ` Hans Hagen
2 siblings, 1 reply; 19+ messages in thread
From: Bruce Horrocks @ 2024-01-18 22:15 UTC (permalink / raw)
To: ntg-context mailing list
On 18 Jan 2024, at 18:56, Shiv Shankar Dayal <shivshankar.dayal@gmail.com> wrote:
>
> I understand that why it is slow, but the problem is that the difference is too high.
> My book has lots of math, so perhaps that is the reason.
Option 1: Buy or borrow a faster computer. You'll get your desired speed-up far faster than waiting for Hans to make changes, even assuming there is something that can be changed. I'd recommend a Mac M3 :-)
Option 2: Split your book into a project with each chapter, or even part of a chapter as a separate component and compile only the chapter you are working on. Set up a nighttime (or lunchtime) run to regenerate the entire book while you're away from the computer and speed doesn't matter.
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-18 22:15 ` Bruce Horrocks
@ 2024-01-19 9:31 ` Hans Hagen
2024-01-19 10:00 ` Henning Hraban Ramm
2024-01-19 18:13 ` Bruce Horrocks
0 siblings, 2 replies; 19+ messages in thread
From: Hans Hagen @ 2024-01-19 9:31 UTC (permalink / raw)
To: ntg-context
On 1/18/2024 11:15 PM, Bruce Horrocks wrote:
> On 18 Jan 2024, at 18:56, Shiv Shankar Dayal <shivshankar.dayal@gmail.com> wrote:
>>
>> I understand that why it is slow, but the problem is that the difference is too high.
>> My book has lots of math, so perhaps that is the reason.
>
>
> Option 1: Buy or borrow a faster computer. You'll get your desired speed-up far faster than waiting for Hans to make changes, even assuming there is something that can be changed. I'd recommend a Mac M3 :-)
As tex is a single core process (ok, the os might delegate some file
handling to other cores) it benefits from jump in core speed. I use a
2017 laptop with a reasonable fast intel xeon. I have a few docks
spread round with different resolution monitors (1920x1200, 2560×1440,
4096×2160) and performance also depends on the connected monitor.
I'd be curious to know how much these new processors impact performance
over time because the ages of dohbling performance every year are past.
There are several factors that impact performance:
tex engine : quite a bit faster in luametatex
mp engine : quite a bit faster in luametatex
lua engine : not much we can do about
but inefficient macros and usage can offset any gain in engine.
One thing to keep in mind is that tex is an interpreter and all gets
tokenized which is more costly in a 32 bit engine than in an 8 bit one
(like pdftex). And although luametatex is more efficient than luatex
that gets offset by more features that come at a price, but we still
win. It helps a bit to know what tex does and what macros add to that.
Simple timing operations is useless as in practice we have less cache
hits than with a simple loop test: tex is jumping all over memory.
Bottlenecks are often noe where one expects them.
Anyway, if one can choose: go for a few high perfotmance cores over
dozens of so called efficient cores.
(that said: luametatex runs fine on my mobile phone)
> Option 2: Split your book into a project with each chapter, or even part of a chapter as a separate component and compile only the chapter you are working on. Set up a nighttime (or lunchtime) run to regenerate the entire book while you're away from the computer and speed doesn't matter.
Indeed. That's the natural way to deal with large documents.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-19 9:31 ` Hans Hagen
@ 2024-01-19 10:00 ` Henning Hraban Ramm
2024-01-19 10:35 ` Taco Hoekwater
2024-01-19 10:49 ` Hans Hagen
2024-01-19 18:13 ` Bruce Horrocks
1 sibling, 2 replies; 19+ messages in thread
From: Henning Hraban Ramm @ 2024-01-19 10:00 UTC (permalink / raw)
To: ntg-context
Am 19.01.24 um 10:31 schrieb Hans Hagen:
> (that said: luametatex runs fine on my mobile phone)
What’s the smallest/oldest device someone tried LMTX on?
(We were joking about “Hans’ thermostate and Alan’s fridge“…)
Would it run on some 8 bit homecomputer? (I’d guess the RAM is too
limited, and loading from datasette would need hours…)
Just curious.
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-19 10:00 ` Henning Hraban Ramm
@ 2024-01-19 10:35 ` Taco Hoekwater
2024-01-19 10:49 ` Hans Hagen
1 sibling, 0 replies; 19+ messages in thread
From: Taco Hoekwater @ 2024-01-19 10:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
> On 19 Jan 2024, at 11:00, Henning Hraban Ramm <texml@fiee.net> wrote:
>
> Am 19.01.24 um 10:31 schrieb Hans Hagen:
>> (that said: luametatex runs fine on my mobile phone)
>
> What’s the smallest/oldest device someone tried LMTX on?
> (We were joking about “Hans’ thermostate and Alan’s fridge“…)
> Would it run on some 8 bit homecomputer? (I’d guess the RAM is too limited, and loading from datasette would need hours…)
No. You need integers (and pointers) to be at least 32 bits wide. And you also need about 90Mb of RAM for the initial malloc()s.
Historical 8-bit and 16-bit CPUs will not work. A modern fridge might, though. :)
—
Taco Hoekwater E: taco@bittext.nl
genderfluid (all pronouns)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-19 10:00 ` Henning Hraban Ramm
2024-01-19 10:35 ` Taco Hoekwater
@ 2024-01-19 10:49 ` Hans Hagen
1 sibling, 0 replies; 19+ messages in thread
From: Hans Hagen @ 2024-01-19 10:49 UTC (permalink / raw)
To: ntg-context
On 1/19/2024 11:00 AM, Henning Hraban Ramm wrote:
> Am 19.01.24 um 10:31 schrieb Hans Hagen:
>> (that said: luametatex runs fine on my mobile phone)
>
> What’s the smallest/oldest device someone tried LMTX on?
> (We were joking about “Hans’ thermostate and Alan’s fridge“…)
> Would it run on some 8 bit homecomputer? (I’d guess the RAM is too
> limited, and loading from datasette would need hours…)
>
> Just curious.
The smallest i have here is a https://en.wikipedia.org/wiki/RCA_1802
which actually was a very nicely designed thing (also powers the
hubble); processors never became cleaner. Now, as the kit I used only
had 512 bytes ram (later 2K or so) it really learns one how to program
efficiently (thihk of writing a simple game, save and load from cassette
player, etc in that space; dynamic adaptive functions and such) and you
know where I'm coming from'(later pascal and modula).
That said: luametatex has a smaller memory footprint than luatex
although nodes are way bigger but even that won't make it run well on an
8 bit processor, assuming it can address 32 bit mem.
Context mkii started on 4.7 Mhz intel (386) so now we're 1000 times
faster but performance gain is not linear. After all, tex has to compete
with other applications running at the same time (browsers, remote
clients, media apps, web polling apps, zoom, etc.) so it's kin dof
amazing that it actually performs okay.
What boosted performance is for instance ssd's. What might boost is ddr5
memory but that has to catch up with ddr4 first. What also boosted
luametatex is cpu cache. I remember when taco and I moved to the math
part we noticed a drop in performance, until machines got updated with
larger cache. We'd just crossed some magic threshold.
Actually, I kind of assume that we're stuck with cpu performance but
nevertheless luametatex became faster. It helps to develop on an older
machine and not on a yearly updated one as that obscures matters. (Not
that I'd not like a faster machine, but that comes at a steep price.)
Hans
ps. In the tranmsition from pdftex to luatex to luametatex one should
not underestimate Taco's effort of going from basically unreadable and
useless C output by web2c (pascal -> c) to what became the luatex C code
base (with embedded original documentation). From that we added more
functionality gradually over a decade till luametatex spun off, which
then lead to quite a bit of refactoring again (but trying to maintain
the spirit of how tex is programmed).
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-19 9:31 ` Hans Hagen
2024-01-19 10:00 ` Henning Hraban Ramm
@ 2024-01-19 18:13 ` Bruce Horrocks
2024-01-19 18:30 ` Hans Hagen
1 sibling, 1 reply; 19+ messages in thread
From: Bruce Horrocks @ 2024-01-19 18:13 UTC (permalink / raw)
To: ntg-context mailing list
> On 19 Jan 2024, at 09:31, Hans Hagen <j.hagen@xs4all.nl> wrote:
>
> On 1/18/2024 11:15 PM, Bruce Horrocks wrote:
>> On 18 Jan 2024, at 18:56, Shiv Shankar Dayal <shivshankar.dayal@gmail.com> wrote:
>>>
>>> I understand that why it is slow, but the problem is that the difference is too high.
>>> My book has lots of math, so perhaps that is the reason.
>> Option 1: Buy or borrow a faster computer. You'll get your desired speed-up far faster than waiting for Hans to make changes, even assuming there is something that can be changed. I'd recommend a Mac M3 :-)
>
> As tex is a single core process (ok, the os might delegate some file handling to other cores) it benefits from jump in core speed. I use a 2017 laptop with a reasonable fast intel xeon. I have a few docks spread round with different resolution monitors (1920x1200, 2560×1440, 4096×2160) and performance also depends on the connected monitor.
>
> I'd be curious to know how much these new processors impact performance over time because the ages of dohbling performance every year are past.
I mentioned the Mac M3 because it's not the cores that make the difference but the speed of the SSD. So reading the source and writing out the result, plus writing/reading any intermediate files is astonishingly fast on the Mac. Also the RAM is on the same die as the chip so RAM access speeds are high. Even if the app is single-threaded, the speed increases are significant - in fact especially when the app is single is threaded. :-)
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread
* [NTG-context] Re: Why LuaMetaTex is so slow?
2024-01-19 18:13 ` Bruce Horrocks
@ 2024-01-19 18:30 ` Hans Hagen
0 siblings, 0 replies; 19+ messages in thread
From: Hans Hagen @ 2024-01-19 18:30 UTC (permalink / raw)
To: ntg-context
On 1/19/2024 7:13 PM, Bruce Horrocks wrote:
>
>
>> On 19 Jan 2024, at 09:31, Hans Hagen <j.hagen@xs4all.nl> wrote:
>>
>> On 1/18/2024 11:15 PM, Bruce Horrocks wrote:
>>> On 18 Jan 2024, at 18:56, Shiv Shankar Dayal <shivshankar.dayal@gmail.com> wrote:
>>>>
>>>> I understand that why it is slow, but the problem is that the difference is too high.
>>>> My book has lots of math, so perhaps that is the reason.
>>> Option 1: Buy or borrow a faster computer. You'll get your desired speed-up far faster than waiting for Hans to make changes, even assuming there is something that can be changed. I'd recommend a Mac M3 :-)
>>
>> As tex is a single core process (ok, the os might delegate some file handling to other cores) it benefits from jump in core speed. I use a 2017 laptop with a reasonable fast intel xeon. I have a few docks spread round with different resolution monitors (1920x1200, 2560×1440, 4096×2160) and performance also depends on the connected monitor.
>>
>> I'd be curious to know how much these new processors impact performance over time because the ages of dohbling performance every year are past.
>
> I mentioned the Mac M3 because it's not the cores that make the difference but the speed of the SSD. So reading the source and writing out the result, plus writing/reading any intermediate files is astonishingly fast on the Mac. Also the RAM is on the same die as the chip so RAM access speeds are high. Even if the app is single-threaded, the speed increases are significant - in fact especially when the app is single is threaded. :-)
File caching helps a lot indeed. Just compare
context --make
after a reboot with the second or third time after that.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 19+ messages in thread