[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.
- Re: Native line numbers landed on master, Juanma Barranquero, 2019/10/01
- Re: Native line numbers landed on master, Yuri D'Elia, 2019/10/01
- Re: Native line numbers landed on master, Lars Ingebrigtsen, 2019/10/01
- Re: Native line numbers landed on master, Eli Zaretskii, 2019/10/01
- Re: Native line numbers landed on master, Juanma Barranquero, 2019/10/01