[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: Bignum performance
From: |
tomas |
Subject: |
Re: [PATCH] Re: Bignum performance |
Date: |
Wed, 16 Aug 2023 06:44:20 +0200 |
On Wed, Aug 16, 2023 at 11:17:01AM +0800, Po Lu wrote:
> Emanuel Berg <incal@dataswamp.org> writes:
>
> > Po Lu wrote:
[...]
> >> Lisp systems normally set aside several of the high or low
> >> bits of a register as a tag linking a type to the
> >> object represented.
> >
> > But here we are at the CPU architecture level (register
> > length), surely Lisp don't meddle with that?
> >
> > No, I sense that it is, actually. So please explain, then, how
> > it works. And in particular, how many bits do we (Elisp and
> > CL) actually have for our fixnums?
>
> I don't know about SBCL, but as for Emacs, refer to the definition of
> VALBITS in lisp.h (maybe also the right files among m/*.h and s/*.h, but
> I have no idea where they've disappeared to.)
That is what I was hinting at with "tagged representation": Emacs
Lisp does it, we don't know about SBCL. Typically, a good implementation
has small stretches of code where the values are as-is because the
compiler can prove what their type is (fixnum, whatever). But that
means that fixnums are usually limited to less than the full machine
word's width (e.g. 60 bits if your tag is four bits wide), because
your lisp has to be able to stuff them back into such a place.
Cheers
--
t
signature.asc
Description: PGP signature
- Re: [PATCH] Re: Bignum performance (was: Shrinking the C core), (continued)
- Re: [PATCH] Re: Bignum performance, Po Lu, 2023/08/15
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/15
- Re: [PATCH] Re: Bignum performance, tomas, 2023/08/15
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/15
- Re: [PATCH] Re: Bignum performance, Po Lu, 2023/08/15
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/15
- Re: [PATCH] Re: Bignum performance, Po Lu, 2023/08/15
- Re: [PATCH] Re: Bignum performance,
tomas <=
- Re: [PATCH] Re: Bignum performance, Gerd Möllmann, 2023/08/16
- Re: [PATCH] Re: Bignum performance, Gerd Möllmann, 2023/08/16
- Re: [PATCH] Re: Bignum performance, Po Lu, 2023/08/16
- Re: [PATCH] Re: Bignum performance, Gerd Möllmann, 2023/08/16
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/16
- Re: [PATCH] Re: Bignum performance, Simon Leinen, 2023/08/18
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/19
- Re: [PATCH] Re: Bignum performance, Ihor Radchenko, 2023/08/20
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/20
- Re: [PATCH] Re: Bignum performance, Emanuel Berg, 2023/08/28