emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Change module interface to no longer use GMP objects directl


From: Paul Eggert
Subject: Re: [PATCH] Change module interface to no longer use GMP objects directly.
Date: Mon, 25 Nov 2019 13:03:02 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 11/24/19 1:28 AM, Andreas Schwab wrote:
It's like compiling for a completely different architecture.

Yes, and that's the point.

We agree that choice of 'configure' options can change the platform, and that one cannot assume that modules built for one platform are compatible with an Emacs built for another.

The disagreement is whether we should consider GMP to be "part of Emacs" (so GMP should not affect the module ABI) or "part of the platform" (so GMP can affect it). Both approaches are plausible; the former lets modules be more portable, and the latter gives modules better performance. Although I'm a fan of portability, here the portability advantage seems small and the performance advantage significant, so it's not clear that saying "GMP is part of Emacs" would be a win.

Since an Emacs 27 release is imminent, perhaps the best thing to do would be to remove the extract_big_integer and make_big_integer methods from src/emacs-module.h.in. These methods are not good in master because they depend on gmp.h, and the proposed replacements are not good because they're slow and awkward. Surely we can do better than either, but we can't do that in a rush.

Plus, quite possibly it will turn out that module authors don't much need a specialized API for bignums. After all, we've gotten along so far without a specialized API for bool-vectors, and to some extent bignums are just bool-vectors in disguise.

I can propose a simple patch along these lines, if there's interest.



reply via email to

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