emacs-devel
[Top][All Lists]
Advanced

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

Re: Native line numbers landed on master


From: Eli Zaretskii
Subject: Re: Native line numbers landed on master
Date: Tue, 01 Oct 2019 12:26:35 +0300

> From: Juanma Barranquero <address@hidden>
> Date: Tue, 1 Oct 2019 10:55:51 +0200
> Cc: address@hidden, Emacs developers <address@hidden>
> 
> BTW, this:
> 
>       else if (lnum_to_display % 10 == 0)
>         tem_it.face_id = tenth_lnum_face_id;
>       else if (lnum_to_display % 5 == 0)
>         tem_it.face_id = fifth_lnum_face_id;
>       else
>         tem_it.face_id = lnum_face_id;
> 
> could also be written
> 
>       else if (lnum_to_display % 5 != 0)
>         tem_it.face_id = lnum_face_id;
>       else if (lnum_to_display % 10 == 0)
>         tem_it.face_id = tenth_lnum_face_id;
>       else /* lnum_to_display % 5 == 0 */
>         tem_it.face_id = fifth_lnum_face_id;
> 
> with the idea that 80% of lines fall into the linum_face_id case, so it's 
> better to have it first. But I suspect it's a
> micro-optimization best left to modern compilers.

I'm okay with either version.



reply via email to

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