While working with Charm-Crypto package, I need to do lots and lots of group element exponentiation. The group elements come from bi-linear pairing group. The Order of the group element is a 1024 bit integer. So to reduce the average cost of exponentiation, I wanted to use memoization.
But I came to know that List does not support long indices (which I need very much). So I went for dictionary which is taking a lot of time & space.
Could you suggest some other methods/data structure in python to reduce the exponentiation cost. I am using iterative square-multiply technique to do the exponentiation.