- or download this
sub ba2bi3 {
my $ba = pack 'C*', (@_, (0) x (4 - ( @_ % 4 || 4 ) ) );
...
}
print ba2bi3( bigint_to_bytearray( Math::BigInt->new('1234567890' x 8)
+ ) );
- or download this
11: +1234567890 <<Length and value under test
Benchmark:
...
best 209/s 756% 246% -- -3%
clean 214/s 778% 255% 3% --
The results are the same
- or download this
301: +1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
...
clean 0.352 1555% 273% -- -1%
best 0.349 1569% 276% 1% --
The results are the same
- or download this
C:\test>229290
Name "main::ba" used only once: possible typo at C:\test\229290.pl lin
+e 67.
...
demerphq 2.86/s 1553% 272% 1% -- -0%
best 2.86/s 1553% 272% 1% 0% --
The results are the same