emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPS: bignums


From: Helmut Eller
Subject: Re: MPS: bignums
Date: Tue, 07 May 2024 18:33:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Tue, May 07 2024, Mattias Engdegård wrote:

>> The reason why mpz_t in GMP is a mutable type is probably because they
>> need computations of the kind a := a + b a lot when doing crypto stuff
>> and in this case memory can be reused efficiently.
>
> Yes, but our bignums aren't mutable. I think it would probably end up
> cheaper to use scratch mpz for the computation, create a single MPS
> allocation for the bignum, and memcpy the data to it. (Especially
> since bignums are small.)

I tried to do this but the expression *xbignum_val is used all over the
place.  And I didn't want to add two dozens #ifdefs for this; so I gave
up.



reply via email to

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