I have completely rewritten my Arbitrary Precision Integer Arithmetic library (bigint.bbc) to take advantage of array slicing. This has more than doubled its speed (the one-million-digit Fibonacci calculation has fallen from 168 seconds to 77 seconds on this laptop, which I don't think is too bad for interpreted BASIC).
Of course a compiled (machine code) library would be much faster, but it wouldn't be portable across the full range of platforms supported by BBC BASIC for SDL 2.0, which mine is. The new library is here, it handles addition, subtraction and multiplication but not (yet) integer division.
Of course a compiled (machine code) library would be much faster, but it wouldn't be portable across the full range of platforms supported by BBC BASIC for SDL 2.0, which mine is. The new library is here, it handles addition, subtraction and multiplication but not (yet) integer division.
Statistics: Posted by RichardRussell — Sun Apr 13, 2025 4:16 pm