unzvfu / cuda-fixnum

Extended-precision modular arithmetic library that targets CUDA.
MIT License
34 stars 8 forks source link

Specialise multi_modexp to case where all exponents are small #11

Open unzvfu opened 4 years ago

unzvfu commented 4 years ago

From https://github.com/data61/cuda-fixnum/issues/25:

There is an implementation of this in the attic that definitely performs better than the full version. It would be nicer still to have a single version that works well in both cases; this might be achieved by calculating max(bitlen(exp[i])) over all the exponents and starting the main loop from there.