Cached modular inverses
michiexile opened this issue · 3 comments
michiexile commented
For relatively small primes (say < 65k or so), precalculating all inverses and storing them in a lookup table is often faster (amortized over a long calculation in the same finite field) than recalculating each inverse whenever it is needed.
PoslavskySV commented
Thanks for the suggestion! I'm not sure that currently this is really needed, but at some point I'll certainly return to this.
michiexile commented
I'm looking to adopt the library for a large persistent homology project
I'm planning - and for that, there will be sufficiently many computations
within a single finite field that using cached inverses is critical to get
useful performance.
…On Mon, Aug 26, 2019, 16:39 Stanislav Poslavsky ***@***.***> wrote:
Thanks for the suggestion! I'm not sure that currently this is really
needed, but at some point I'll certainly return to this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#57?email_source=notifications&email_token=AAAH6LUTUQUCHEVLY5E3SSTQGQ5RRA5CNFSM4IMKWGJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5FTO3Y#issuecomment-525023087>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAH6LRMHFRLHN2FXTPPEYTQGQ5RRANCNFSM4IMKWGJA>
.
PoslavskySV commented
I see. I've created a small PR #59 which addresses this issue. Is that what you need?