math.binpack: make binpacking much faster by caching total weight per bin.