jsonwebtoken/benches
Ten0 f9771f7835 Improve deserialization performance around validation and its tests (#202)
* Improve deserialization performance around validation and its tests

The claims validation was done via deserializing into a Map, which
implies allocations/deallocations. This was done even if the map was not
used afterwards.

This commit improves performance of the validation by never
deserializing in a `Map`, and deserializing only when necessary, to
a struct that typically only borrows from the original b64-decoded
json string.

The validation function interface change required update to the tests,
which are also made easier to read by using the `serde_json::json!`
macro.

* unrelated: fix bench compilation
2022-02-02 22:10:11 +01:00
..
jwt.rs Improve deserialization performance around validation and its tests (#202) 2022-02-02 22:10:11 +01:00