Quote Originally Posted by Zeus_ View Post
Yeah, that looks a lot cleaner. I'll implement exactly that tonight. Also, just realised that the above code in the benchmark comment is an older version of what I was doing (which has a LOT of implementation errors). My file names were pretty messy and I seemed to have copy-pasted the wrong one (whenever I'm finished coding for a particular day, I store the progress until then separately. This way I record my progress on any project I'm working on). If you hadn't commented, I would've never looked through and realised that. So, thanks! In the current version that I'm writing, I've removed all template BASE related code and instead just implemented everything in base 10 (because it is way simpler to implement, and works way faster than any other base, plus reduces time and space consumed on construction). To compensate for that, I'm adding a to_base utility function that returns a BigInt converted to some base [2,16 (or maybe 36, as letters go up to 'z')] (obviously, with DIGITS_PER_SLOT digits at each index of its respective vector Digits).
I have a 15-ish times better complexity for 1e5 100-digit number multiplications i.e. the algorithm finishes processing 15 times faster on average. Or, would you like me to try the implementation and figure out the hard way? I'm okay with either choice. Also, if I choose to implement using bitsets, trying to do things in binary like how it works for actual ints because this will obviously be incredibly fast,