[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstr

From: Alan Mackenzie
Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps.
Date: Sun, 25 Nov 2018 17:59:29 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Eli.

On Sun, Nov 25, 2018 at 18:40:54 +0200, Eli Zaretskii wrote:
> > Date: Sun, 25 Nov 2018 15:42:03 +0000
> > Cc: "Charles A. Roelli" <address@hidden>, address@hidden,
> >   address@hidden, address@hidden, address@hidden,
> >   address@hidden
> > From: Alan Mackenzie <address@hidden>

> > The idea behind symbols-with-pos-enabled is that it will be a 32/64 bit
> > integer permanently in cache, hence can be tested for zero/non-zero
> > rapidly.

> This is premature optimization, we have gazillions of such tests in
> our inner loops (e.g., see bidi.c), one more or one less shouldn't
> matter.

It's a straightforward way of writing it, without using any contorted
code, so even if it is optimisation, it's harmless optimisation.

But right from the beginning of the exercise, I've had speed at the back
of my mind.  If the slowdown had been 30%, the Emacs project leadership
would have been very unhappy about the idea.

My current trouble arises from the need to access the variable both from
C and from Lisp.

> > Even so, the mechanism has slowed Emacs down by seven or eight per cent.

> I'd be very surprised if using a boolean Lisp variable would slow that
> down more.

I'm still a little confused as to what a DEFVAR_BOOL is.  Is it a full
Lisp_Object, of which only one bit is used, or is it one of many
DEFVAR_BOOLs packed into a single word?

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]