Robbepop / apint

Arbitrary precision integers library.
Other
27 stars 4 forks source link

Optimize add/sub with 51-radix-trick #37

Open Robbepop opened 5 years ago

Robbepop commented 5 years ago

More information here: https://www.chosenplaintext.ca/articles/radix-2-51-trick.html

AaronKutch commented 5 years ago

Interesting. I have an AMD processor to see what the performance change looks like there. We need to focus on getting a few more important PRs done and making a release before focusing on this.

AaronKutch commented 5 years ago

I am guessing you came across this as part of your job. Are there any other tricks and articles like this you have come across?

Robbepop commented 5 years ago

I really liked the write up and I think apint could really profit from this. As far as I know our current div-rem algorithms are basically an advanced long-division and we could potentially make use of knuth-division there.

You are right though that we really really need to focus on a new release before all of that.