llllllllll / jlist

A Python list replacement that's optimized for homogeneous collections.
Apache License 2.0
45 stars 1 forks source link

BUG: fix int64 boxing fallback in jl.sum #6

Closed llllllllll closed 5 years ago

llllllllll commented 5 years ago

fixes: https://github.com/llllllllll/jlist/issues/5

When falling back to a boxing sum, we need to know the index (inclusive) of all the elements that have already been summed, but I forgot to increment the index in the loop, so when the overflow happened, we would re-sum the prefix that fit in an int64.

llllllllll commented 5 years ago

The tests looks good to me.