Skip Menu |
 

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 16032
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.77
Fixed in: (no value)



Subject: lib GMP versus lib PARI versus lib GMP,PARI
Download (untitled) / with headers
text/plain 589b
Consider this hypothetical situation. Both Math::BigInt::Pari and Math::BigIt::GMP are installed, and I have a program like use Math::BigInt lib => 'PARI'; use Crypt::DSA::KeyChain; Since http://search.cpan.org/dist/Crypt-DSA/lib/Crypt/DSA/KeyChain.pm uses use Math::BigInt lib => 'GMP'; Both GMP and PARI would be loaded into memory, but only one would be used. The easy way to avoid this is to not install both Math::BigInt::Pari and Math::BigIt::GMP, but the situation can come up. Soo, you might warn about this?? Or modify sub import to accept lib => only once? Thanks
Download (untitled) / with headers
text/plain 1.4k
On Tue Nov 22 09:13:21 2005, guest wrote: Show quoted text
> Consider this hypothetical situation. > Both Math::BigInt::Pari and Math::BigIt::GMP are installed, > and I have a program like > > use Math::BigInt lib => 'PARI'; > use Crypt::DSA::KeyChain; > > Since http://search.cpan.org/dist/Crypt-DSA/lib/Crypt/DSA/KeyChain.pm > uses > use Math::BigInt lib => 'GMP'; > > Both GMP and PARI would be loaded into memory, > but only one would be used. > > The easy way to avoid this is to not install both > Math::BigInt::Pari and Math::BigIt::GMP, > but the situation can come up. > > Soo, you might warn about this?? > Or modify sub import to accept lib => only once?
That would be an option, I have to think about it. Note that there is no harmin loading both, except a tiny bit of memory overhead: No lib loaded (results in FastCalc loaded): (In Kbytes) Virt Res Shared 6648 4112 1464 S 0.0 0.4 0:00.08 perl Calc loaded (pure-perl): 6332 3804 1404 S 0.0 0.4 0:00.06 perl GMP loaded: 6156 3504 1476 S 0.0 0.3 0:00.05 perl (Yes, it actually needs less memory :) Pari loaded: 12952 4748 1788 S 0.0 0.5 0:00.08 perl Both loaded: 13300 4840 1820 S 0.0 0.5 0:00.07 perl So, Pari needs loads of memory, while GMP uses the least amount. It is also the fastes of the libs for large numbers. Loading both needs much more memory as loading none or even loading GMP, but the memory-hog is Pari, not GMP :) Best wishes, Tels
Download (untitled) / with headers
text/plain 351b
At the moment I do not see a way to implement this without adding YetAnotherGlobal variable, which I am very reluctant to do due to problems with Threads (where globals are deadly). I think the best way to fix is to change all packages that use "Pari" to "GMP" as this is faster, uses less memory and is better maintained, anyway. Best wishes, Tels


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.