quininer / cbor4ii

CBOR: Concise Binary Object Representation
MIT License
54 stars 5 forks source link

avoid repeated fmt calls #1

Closed quininer closed 2 years ago

quininer commented 2 years ago

https://github.com/quininer/cbor4ii/blob/master/src/serde/ser.rs#L269

In order to optimize short fmt input, we will first try fmt to a small buffer, if it fails, we will perform a new fmt. we can unify these two fmt.

quininer commented 2 years ago

close by https://github.com/quininer/cbor4ii/commit/349add7096231963f4f89799e5475d033d27ad6a