[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shrinking the C core
From: |
Ihor Radchenko |
Subject: |
Re: Shrinking the C core |
Date: |
Sun, 20 Aug 2023 19:24:36 +0000 |
Ihor Radchenko <yantar92@posteo.net> writes:
> The only problem (AFAIU) is that GCC JIT cannot reach inside subr level,
> so all these information does not benefit Emacs functions implemented in
> C.
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.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- 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, Emanuel Berg, 2023/08/27
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core,
Ihor Radchenko <=
- Re: Shrinking the C core, Eli Zaretskii, 2023/08/20
- 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