ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: Why LuaMetaTex is so slow?
Date: Fri, 19 Jan 2024 10:31:44 +0100	[thread overview]
Message-ID: <465942d5-a13e-4e36-a216-1a712bcc4793@xs4all.nl> (raw)
In-Reply-To: <1D10E87A-3A45-4CB3-812B-638A185B1455@scorecrow.com>

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
___________________________________________________________________________________

  reply	other threads:[~2024-01-19  9:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 17:24 [NTG-context] " Shiv Shankar Dayal
2024-01-18 17:47 ` [NTG-context] " Pablo Rodriguez via ntg-context
2024-01-18 18:40   ` Henning Hraban Ramm
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-19  0:09           ` Hans Hagen via ntg-context
2024-01-19  0:33             ` Aditya Mahajan
2024-01-19  8:51               ` Hans Hagen
2024-01-18 22:15       ` Bruce Horrocks
2024-01-19  9:31         ` Hans Hagen [this message]
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
2024-01-19 18:30             ` Hans Hagen
2024-01-18 20:55 ` Gavin via ntg-context
2024-01-18 21:33   ` Joseph Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465942d5-a13e-4e36-a216-1a712bcc4793@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).