johannesvollmer / exrs

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

optimize endianness conversion and tests #216

Closed johannesvollmer closed 12 months ago

johannesvollmer commented 12 months ago

from 15 to 7 minutes in ci, nice down to 50 sec on my local machine, EPIC

johannesvollmer commented 12 months ago

also implements the changes suggested in #193

johannesvollmer commented 12 months ago

making it msrv compatible...

johannesvollmer commented 12 months ago

benchmarks indicate about 10% speed improvement, in addition to the memory usage improvement observed in #193

new read_image_rgba_f32_to_f16 ... bench:  36,449,700 ns/iter (+/- 11,014,462)
old read_image_rgba_f32_to_f16 ... bench:  39,865,870 ns/iter (+/- 11,269,662)

new read_image_rgba_f32_to_f32 ... bench:  17,945,880 ns/iter (+/- 5,591,088)
old read_image_rgba_f32_to_f32 ... bench:  20,705,720 ns/iter (+/- 1,138,454)

new read_image_rgba_f32_to_u32 ... bench:  22,919,690 ns/iter (+/- 8,545,283)
old read_image_rgba_f32_to_u32 ... bench:  24,306,690 ns/iter (+/- 1,395,345)

new read_single_image_rle_all_channels               ... bench:  27,453,250 ns/iter (+/- 6,212,354)
old read_single_image_rle_all_channels               ... bench:  29,876,000 ns/iter (+/- 6,462,473)