Subject: bug#44564: 27.1; C-n in macros causes long delays

From: Eli Zaretskii <[email-masked]>
Date: Wed, 03 Feb 2021 20:19:24 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 03 Feb 2021 18:58:47 +0100
> Cc: [email-masked]
> 
> > (benchmark-run 100 (next-line)) ===> (0.28576279800000004 1
> > 0.025205666000000013)
> > (benchmark-run 100 (forward-line)) ===> (0.00010560799999999998 0 0.0)
> >
> > That's quite a significant difference between next-line and forward-line!
> 
> Yup; `next-line' is a surprisingly complex function.

Only when line-move-visual is non-nil.  If the OP's application
doesn't need that, the function will run much faster if
line-move-visual is bound to nil.