rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
419 stars 52 forks source link

Micro-optimization to save allocations in extension::util::parse_extension() and extension::util::parse_extension_element() #133

Closed mcronce closed 2 years ago

mcronce commented 2 years ago

It's pretty insignificant in terms of actual execution performance (in the added read_extensions() benchmark, the difference is only a couple percent) but it does cut down number of allocations (of the whole application!) by ~4%, at least in the application in which I'm using rss :)

It also (unrelated) cleans up some Clippy warnings in the 3rd commit