From owner-freebsd-arch Sat Jul 14 1:53:20 2001 Delivered-To: freebsd-arch@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 8C8FB37B401 for ; Sat, 14 Jul 2001 01:53:17 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 13FCB3E2F; Sat, 14 Jul 2001 01:53:17 -0700 (PDT) To: tlambert2@mindspring.com Cc: arch@FreeBSD.ORG Subject: Re: Getting rid of libgmp In-Reply-To: <3B4F4062.1B661B6D@mindspring.com>; from tlambert2@mindspring.com on "Fri, 13 Jul 2001 11:39:30 -0700" Date: Sat, 14 Jul 2001 01:53:16 -0700 From: Dima Dorfman Message-Id: <20010714085317.13FCB3E2F@bazooka.unixfreak.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Terry Lambert writes: > Dima Dorfman wrote: > > > > Hi folks, > > > > A week or so ago there was a thread on -current about removing libgmp. > > It was generally agreed that this was a good idea, but (as usual) > > somebody has to do the work, and some people wanted FreeBSD to > > continue to supply a libmp-compatible interface. > > > > To satisfy both groups, I propose that we import a libmp that is > > implemented in terms of the OpenSSL BIGNUM library. Attached below is > > a sharball of such an implementation. I couldn't find very good > > documentation on the libmp interface, but I've tested this with > > most[1] of the software in FreeBSD that uses libmp, and all programs > > work as well as they did before. > > > > The library is quite small; all functions except msqrt() have a BIGNUM > > equivilent. It requires that the program using it be linked with > > -lcrypto[2]. > > > > Comments? Suggestions? > > Benchmarks, proving that you increased, or at least did not > injure performance with this change? My wrapper around OpenSSL's BIGNUM library doesn't introduce any performance penalties beyond one or two more 'call' instructions. If OpenSSL's BIGNUM library is slower than libgmp (and it probably is), then someone just needs to fix that. The fact that I decided to write a wrapper around BIGNUM instead of converting all the programs which use libmp to use BIGNUM is better from a performance point of view; at least this way it's easier to change to another BIGNUM implementation (you'd only have to change this library instead of all those programs). Besides, as has been discussed before, all the applications this is used for in FreeBSD are not performance-critical. Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message