emacs-devel
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: Re: Add more supported primitives in libgccjit IR (was: Shrinking the C core)
Date: Mon, 21 Aug 2023 15:20:35 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: gregory@heytings.org, luangruo@yahoo.com, akrl@sdf.org, eliz@gnu.org,
>  incal@dataswamp.org, emacs-devel@gnu.org
> 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.

This discussion is almost useless without Andrea on board, and you are
using hist stale email address.  Please use the one I used here
instead.

And I really suggest that people wait for Andrea to chime in, before
discussing code that he wrote and still maintains very actively.



reply via email to

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