On Jun 25, 2013, at 1:56 PM, Peter Levart <peter.lev...@gmail.com> wrote: > > Sorry, you are storing back when resizing. And you are resizing for every > exponent that is bigger that previous requested (cached). This can lead to > many resizings.
Hi everyone, Apologies to butt in, and maybe this is a very stupid suggestion, but is the added complexity and potential for data race-introduced bugs worth the added efficiency over (for example) a ConcurrentMap<Long, BigInteger> with a key of "radix << 32 | exponent" ? It is clearly not as efficient, but it does have the virtue that even mere mortals like myself can understand that it is safe code, and maybe it is "good enough" :-) Best, Steven