High-performance arbitrary base integer conversion library
This library provides efficient conversion between arbitrary base numeral systems using a custom character table approach. It supports very large numbers through its custom BigInt implementation that avoids overflow issues.
Features
- Convert between any two bases using custom character tables
- Supports arbitrarily large integers
- Optimized performance with limb-based arithmetic
- No external dependencies
Examples
use convert_base;
// Convert hexadecimal to octal
let result = convert_base.unwrap;
assert_eq!;
// Convert decimal to hexadecimal
let result = convert_base.unwrap;
assert_eq!;
Performance
The library uses a limb-based BigInt implementation with a radix of 1,000,000,000 to efficiently handle large numbers while avoiding overflow. Arithmetic operations use u128 intermediates for additional safety. High-performance arbitrary base integer conversion (optimized version)
- Uses limb base = 1_000_000_000 (1e9)
- Uses u128 as intermediate to avoid overflow