[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shrinking the C core
From: |
Eli Zaretskii |
Subject: |
Re: Shrinking the C core |
Date: |
Mon, 21 Aug 2023 05:33:50 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: eliz@gnu.org, incal@dataswamp.org, emacs-devel@gnu.org
> Date: Sun, 20 Aug 2023 19:24:36 +0000
>
> If I am right here, it might actually be worth it to rewrite some of the
> subroutines into Elisp. For example rounding_driver (called by
> `floor') code is full of runtime type checks:
>
> CHECK_NUMBER (n);
> if (NILP (d))
> ...
> CHECK_NUMBER (d);
> ...
> if (FIXNUMP (d))
> if (XFIXNUM (d) == 0)
> ...
> if (FIXNUMP (n))
> ...
> else if (FLOATP (d))
> if (XFLOAT_DATA (d) == 0)
> int nscale = FLOATP (n) ? double_integer_scale (XFLOAT_DATA (n)) : 0;
> ..
>
> During native compilation, if type information and n and d is available,
> GCC might have a chance to cut a number of branches away from the above
> code.
Cut them how? AFAICT, none of the tests above are redundant.
- Re: Shrinking the C core, (continued)
- Re: Shrinking the C core, Eli Zaretskii, 2023/08/20
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/20
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/20
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/20
- Re: Shrinking the C core, Eli Zaretskii, 2023/08/20
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core,
Eli Zaretskii <=
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21
- Re: Shrinking the C core, Po Lu, 2023/08/21
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21
- Re: Shrinking the C core, Po Lu, 2023/08/21
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21
- RE: [External] : Re: Shrinking the C core, Drew Adams, 2023/08/21
- Re: Shrinking the C core, Po Lu, 2023/08/21
- Add more supported primitives in libgccjit IR (was: Shrinking the C core), Ihor Radchenko, 2023/08/21
- Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core), Gregory Heytings, 2023/08/21
- Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core), Ihor Radchenko, 2023/08/21