cboumalh opened a new pull request, #76:
URL: https://github.com/apache/datasketches-python/pull/76
Switches the per-entry deserialization buffer from an allocated nb::bytes
(which copied the full remaining serialized blob on every retained entry,
producing O(N²) copy work on large sketches) to a zero-copy memoryview over the
C++ buffer. Updates the PyObjectSerDe.from_bytes contract from bytes to a
buffer-protocol object and adjusts PyStringsSerDe accordingly. Also fixing a
3-byte length-prefix read that corrupted string summaries ≥ 16 MB.
default performance:
```
Building compact tuple sketch: lg_k=19 (k=524288), n=524288
build time: 0.27 s, estimate=524288, retained=524288
serialize: mean= 176.46 ms stdev= 0.00 ms min= 176.46 ms
n=1
serialized size: 6,291,472 bytes
deserialize: mean=73239.24 ms stdev= 0.00 ms min=73239.24 ms
n=1
```
performance with memory view:
```
Building compact tuple sketch: lg_k=19 (k=524288), n=524288
build time: 0.21 s, estimate=524288, retained=524288
serialize: mean= 147.77 ms stdev= 0.00 ms min= 147.77 ms
n=1
serialized size: 6,291,472 bytes
deserialize: mean= 150.76 ms stdev= 0.00 ms min= 150.76 ms
n=1
```
[bench_tuple_serde.py](https://github.com/user-attachments/files/34657329/bench_tuple_serde.py)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]