Closed arcondello closed 1 week ago
On the one hand, this is a pretty harmless PR, on the other I am underwhelmed with the results. A simple benchmark
10000 binary variables in a single array with 25 states, uncompressed
serialization time: 0.006702525999571662s
file size in bytes: 2007953 bytes
10000 binary variables in a single array with 25 states, compressed
serialization time: 0.06300492599984864s
file size in bytes: 83618 bytes
10000 binary variables as 10000 scalars with 25 states, uncompressed
serialization time: 9.95059110299917s
file size in bytes: 74242127 bytes
10000 binary variables in a single array with 25 states, compressed
serialization time: 13.670800387000781s
file size in bytes: 57585889 bytes
Closing this as stale for now. It's not a bad idea, but perhaps needs more thinking before we actually merge it.
By default this maintains the existing behavior but allows us to toggle it via a keyword argument.
See also https://github.com/dwavesystems/dimod/pull/1296