[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add more supported primitives in libgccjit IR (was: Shrinking the C
From: |
Ihor Radchenko |
Subject: |
Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core) |
Date: |
Mon, 21 Aug 2023 11:41:53 +0000 |
"Alfred M. Szmidt" <ams@gnu.org> writes:
> > Look at data.c:arith_driver. You'll see that it's essentially a
> function
> > which dispatches the handling of its arguments depending on their type...
> >
> > These integer/float/bignum types are not known at compilation time ...
>
> This is not correct. If you have something like
> (progn (setq x 1) (> x 2)), compiler is actually able to determine the
> type of X at compilation time.
>
> It is absolutley correct, the Emacs compiler is not capable of doing
> what you are suggesting. There are no specific functions for fixnum
> comparison in Emacs Lisp, nor is the Emacs Lisp compiler capable of
> being instructed to do such specific things. I've been repeating this
> constantly now. That is needed to make programs faster in Lisp.
I can see
/*
Define a substitute for Fadd1 Fsub1.
Currently expose just fixnum arithmetic.
*/
static void
define_add1_sub1 (void)
in comp.c
So, there is some type-specific optimization going on.
It looks very limited though.
--
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, 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
- Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core), Alfred M. Szmidt, 2023/08/21
- Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core),
Ihor Radchenko <=
- Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core), Eli Zaretskii, 2023/08/21
- Re: Add more supported primitives in libgccjit IR, Andrea Corallo, 2023/08/21
- Re: Add more supported primitives in libgccjit IR, Ihor Radchenko, 2023/08/23
- Re: Add more supported primitives in libgccjit IR, Andrea Corallo, 2023/08/25
- Re: Add more supported primitives in libgccjit IR, Ihor Radchenko, 2023/08/25
- Re: Add more supported primitives in libgccjit IR, Andrea Corallo, 2023/08/25
- Re: Add more supported primitives in libgccjit IR, Ihor Radchenko, 2023/08/26
- Re: Add more supported primitives in libgccjit IR, Emanuel Berg, 2023/08/27
- Re: Add more supported primitives in libgccjit IR, Emanuel Berg, 2023/08/27
- Re: Add more supported primitives in libgccjit IR, Andrea Corallo, 2023/08/27