nim-lang / bigints

BigInts for Nim
MIT License
124 stars 32 forks source link

avoid unnecessary copy in setXLen #36

Closed pietroppeter closed 2 years ago

pietroppeter commented 3 years ago

the fix for #27 done in #35 introduced a copy in setXLen that has some impact in the performance in some cases (see benchmark on chainAddition in this comment). In principle it is possible to fix the issue in self addition without introducing a new copy but it requires more effort.

Note that legacy usage of setXLen remains accessible through a compile time switch bigintsLegacySetXLen.

pietroppeter commented 2 years ago

not relevant anymore given the recent merge (#40).