Math::BigInt::FastCalc#
📦 std
The XS half of Math::BigInt::FastCalc 0.5020: the hot primitives of Math::BigInt’s default library, in C.
Math/BigInt/FastCalc.pm (served verbatim from lib/) is a subclass of Math::BigInt::Calc, which stores a number as an array of base-10**N “parts”, least significant first. These XSUBs replace Calc’s Perl for creating, copying, incrementing, decrementing, comparing and testing such arrays; everything else is Calc’s.
use Math::BigInt lib => 'FastCalc';
print Math::BigInt->new("123456789012345678901234567890") + 1;
# 123456789012345678901234567891
Nothing calls these XSUBs but the library itself. Math::BigInt uses FastCalc when asked to, with lib => 'FastCalc' (or try / only); its default library is plain Math::BigInt::Calc.
Differences from upstream#
None.