Commit Graph

10 Commits

Author SHA1 Message Date
Trangar 9880abe499 Improved encoding and decoding speed of Vec<u8> (#619)
* Improved encoding and decoding speed of Vec<u8>

* Added black_box calls to benches/string.rs
Added a SizeWriter because someone finally has a benchmark to show it's faster

* Improved performance for `impl<T> Encode for [T]`

* Added #[inline] to `impl Encoder for EncoderImpl`

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 11:45:47 +02:00
Trangar 3aa269bfea Fixed new clippy warnings (#617)
* Fixed new clippy warnings

* Undid breaking all the tests

* Fixed more clippy warnings

---------

Co-authored-by: Victor Koenders <git@trang.ar>
2023-03-30 11:06:34 +02:00
Trangar 59b787cbf8 Moved Configuration::standard() and ::legacy() to the config module (#481)
* Moved Configuration::standard() and ::legacy() to the config module

* Fixed issue with config that would overwrite the limit, added a checklist on adding config variables
2022-01-19 16:46:25 +01:00
ygf11 f2d2fc05a8 Fix varint bench failed (#457) 2021-12-22 17:38:57 +01:00
Trangar a5255465bd Made the CI also check the benchmarks, fixed compile issue in benchmarks (#449) 2021-12-11 16:09:23 +01:00
Trangar 404946f12b [Breaking change] Made all `decode_from_slice` also return the number of bytes read (#445) 2021-12-11 15:51:50 +01:00
Trangar 63f4607992 Feature/config limit (#439)
* Added Limit<N> and NoLimit to the configuration
* Added a limit check to Decoder and DecoderImpl
* Added test cases, added a helper function specialized for containers
* Added a test to see if inlining makes the limit config faster, added inlining to the decoder
2021-12-11 15:44:43 +01:00
Victor Koenders 707d0d238f Made all encode and decode functions always require a Config, removed _with_config functions 2021-10-21 14:19:40 +02:00
Lena Hellström 83970d29cf Merge branch 'trunk' into feature/deserde 2021-10-17 21:54:26 +02:00
Ben Kimock 5c541a297a Optimize varint parsing (#337)
* Add benchmarks for varint parsing

* Enable more inlining

* Outline error construction

* Add provided functions to BincodeRead to customize reading of literals

* Add #[inline] to deserialize_byte

* Outline SliceReader::unexpected_eof so that deserialize_varint inlines

* Implement BincodeRead for std::io::BufReader

* Reimplement all of BincodeRead in terms of BufRead-like functions

* Move branch into error-creation function to get below inline threshold
2021-06-19 18:16:13 -07:00