johannesvollmer / exrs

100% Safe Rust OpenEXR file library
Other
149 stars 22 forks source link

Change `convert_current_to_little_endian` to return `Cow<[u8]>` #193

Closed expenses closed 12 months ago

expenses commented 1 year ago

This was a pretty easy change to make. I haven't profiled it but according to heaptrack, this reduces the number of allocations in a benchmark by half:

20230120_19h30m26s_grim 20230120_20h50m04s_grim

johannesvollmer commented 12 months ago

Thanks for the suggestion :) a different PR incorporated these ideas