Fix performance issue in RAW mode
While investigating the use of RAW mode, I noticed that it was *slower* for compression than GZIP or ZLIB wrapper formats, which didn't make sense (i.e. we don't calculate a data integrity check using RAW mode). It turns out that the code was falling back to the portable implementation of insert_string(), instead of using the optimized version that rely on 'crc32w' as a hash function. The reason is that CPU features detection is not triggered while using RAW mode (i.e. we never call crc32() with a NULL buffer). This patch fixes this issue ensuring that RAW mode is going to be faster for both compression/decompression than either ZLIB or GZIP formats. Bug: 833361 Change-Id: I285297f67ffc0114700ed03c2186ad21aab8b40e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929634 Reviewed-by:Chris Blume <cblume@chromium.org> Reviewed-by:
Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#717877} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 171a0a69eb5d70f8a9f44000e26bc7dc65f1fd97
Loading
Please register or sign in to comment