PSeitz / lz4_flex

Fastest pure Rust implementation of LZ4 compression/decompression.
MIT License
441 stars 28 forks source link

simplify extend_from_within_overlapping #72

Closed PSeitz closed 1 year ago

PSeitz commented 1 year ago

extend_from_within_overlapping is used in safe decompression when overlapping data has been detected. The prev version had unnecessary assertions/safe guard, since this method is only used in safe code. Removing the temporary &mut slice also simplified assembly output.

uiCA Code Analyzer

Prev Tool Skylake IceLake Tiger Lake Rocket Lake uiCA Cycles 28.71 30.67 28.71 27.57

Simplified Tool Skylake IceLake TigerLake Rocket Lake uiCA Cycles 13.00 15.00 13.00 11.00