X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: Young Mo Kang <kym327@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Thu, 09 Nov 2023 17:42:01 +0000 Resent-Message-ID: <handler.67022.B.16995516772928 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: 67022 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gzip@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.16995516772928 (code B ref -1); Thu, 09 Nov 2023 17:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 17:41:17 +0000 Received: from localhost ([127.0.0.1]:48681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r191p-0000lA-EJ for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kym327@HIDDEN>) id 1r191m-0000kw-Km for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1914-0001w5-1L for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:30 -0500 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1912-0004NM-8G for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:29 -0500 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-41cd444d9d0so7507451cf.2 for <bug-gzip@HIDDEN>; Thu, 09 Nov 2023 09:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699551626; x=1700156426; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=; b=jsUlC78mD7oKOF0L44AGwOmEw8caH3ZBlLtk9+fcKbWa94xCnLhxzzrZcbxCF6eTWa QqPEps5BX9wqHC+0qkOrCnqMtVY5W7s9OWU5R0c5b5eeahNc8N6lFbHxygy1WOac2kU3 1sBx75dE1KfR12VLF8WZZ2ZBIsYTnQ46Nu6WipIjyoBRUtxK9wsXhMAyV4e5XFilo1SX Cuo46rlNk3YTDVp8QeK+wFQ0xpZnmGqiGROA4sCupsxr3gy6sQGTbZIaPHW3Ra45I1bb KUhfnu3333GmBFVL0w2C8okwzBBkzCvkiu2MVSuPrQExvDrZE7xX3tXuTkmEdlnSB252 4A7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699551626; x=1700156426; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=; b=wDrw2hn6R0f6+F9w31t+3czeJH5PJ5cTY0ZqzNW71H6dS0KCfR/jTl4vbk5JEAlFfj cN3BLaDXCUN6xnXnXT08WjCYk8HFg90C0VnHFHvfnxSLNl6k59AR3z8Uc8oD1tJXA2fW Nv20/x9C8tz+N+kH7LZUDunsnae/o04k3zDTyumkDaCohYUuwJkoPwwdjPEId1LmuqtK e4iResOTsQpDj68tcequG14wqxGeoB8Eg4VKteSkoQtziSkRNRb4/nfhs5JKlA48Bszh ehNGRCUepNMj+EeXmUw+yyvh3ACt+dMdFl7mSghggjwiwJAgH1HXOb5aUlED1YiTX6NI 5uFw== X-Gm-Message-State: AOJu0YxZgzfpkNw9GTTusgX1C+AiJ0YsX6fl/i/f2AVjuT8hAJtH4vzM UmWy/xUUgROhQT1AhfobDYJ5PSzn+A== X-Google-Smtp-Source: AGHT+IFdH5rL1itK2Bjkj4kTnzeLECoO09hfqUiw9rtz+txGQfcdCqdq3U25fV2tI5gJF20Ot0hvGw== X-Received: by 2002:a05:622a:130c:b0:419:5b97:2fbb with SMTP id v12-20020a05622a130c00b004195b972fbbmr6106355qtk.34.1699551626359; Thu, 09 Nov 2023 09:40:26 -0800 (PST) Received: from ?IPV6:2603:7000:3400:d5b2:1b9e:c639:2739:6a32? (2603-7000-3400-d5b2-1b9e-c639-2739-6a32.res6.spectrum.com. [2603:7000:3400:d5b2:1b9e:c639:2739:6a32]) by smtp.gmail.com with ESMTPSA id f10-20020ac8134a000000b004108d49f391sm2114381qtj.48.2023.11.09.09.40.25 for <bug-gzip@HIDDEN> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Nov 2023 09:40:25 -0800 (PST) Message-ID: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> Date: Thu, 9 Nov 2023 12:40:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Young Mo Kang <kym327@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=kym327@HIDDEN; helo=mail-qt1-x836.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck in decompression, and it can run significantly faster >60% if we replace it with crc32 function from zlib. I tested decompression speed of linux source code tar.gz file before and after replacing CRC32 computation. On an AMD 7735HS system, I get Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kym327[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (kym327[at]gmail.com) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.2 (/) Hello, I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck in decompression, and it can run significantly faster >60% if we replace it with crc32 function from zlib. I tested decompression speed of linux source code tar.gz file before and after replacing CRC32 computation. On an AMD 7735HS system, I get GNU Gzip unmodified Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.11 GNU Gzip with CRC32 from zlib Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.16 And I saw even better performance improvement when tested on an Apple Silicon M1 system. GNU Gzip unmodified Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.83 GNU Gzip with CRC32 from zlib Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.72 Since both GNU Gzip and zlib are written by the same authors, I was wondering if GNU Gzip can share zlib's CRC32 calculation and obtain this performance gain--I am not sure if there would be a license issue though. The following bash script should reproduce the result ``` # download GNU Gzip and zlib wget -O- https://ftp.gnu.org/gnu/gzip/gzip-1.13.tar.gz | tar xzf - wget -O- https://zlib.net/zlib-1.3.tar.gz | tar xzf - # download linux source code as a test file for decompression speed wget -O- https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.1.tar.xz | xz -d | gzip > linux.tar.gz # compile zlib cd zlib-1.3 CFLAGS="-O2 -g" ./configure --static && make -j cd .. # compile GNU Gzip cd gzip-1.13 CFLAGS="-O2 -g" ./configure && make -j # measure decompression speed /usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip1.time # use crc32 from zlib cat > util.diff << EOF @@ -27,6 +27,7 @@ #include <stdlib.h> #include <errno.h> +#include "crc32.h" #include "tailor.h" #include "gzip.h" #include <dirname.h> @@ -136,25 +137,14 @@ copy (int in, int out) ulg updcrc (uch const *s, unsigned n) { - register ulg c; /* temporary variable */ - - if (s == NULL) { - c = 0xffffffffL; - } else { - c = crc; - if (n) do { - c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8); - } while (--n); - } - crc = c; - return c ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ + crc = crc32(crc, s, n); } /* Return a current CRC value. */ ulg getcrc () { - return crc ^ 0xffffffffL; + return crc; } #ifdef IBM_Z_DFLTCC EOF patch < util.diff util.c # create header file cat > crc32.h << EOF #pragma once unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len); EOF # copy crc32 object file from zlib cp ../zlib-1.3/crc32.o . # re-compile GNU Gzip gcc -O2 -g -c util.c -Ilib gcc -O2 -g *.o lib/libgzip.a -o gzip # measure decompression speed /usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip2.time # print out time difference cd .. echo echo "GNU Gzip unmodified" grep Elapsed gzip1.time echo "GNU Gzip with CRC32 from zlib" grep Elapsed gzip2.time ```
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Young Mo Kang <kym327@HIDDEN> Subject: bug#67022: Acknowledgement (Gzip decompression can be 60% faster using zlib's CRC32) Message-ID: <handler.67022.B.16995516772928.ack <at> debbugs.gnu.org> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> X-Gnu-PR-Message: ack 67022 X-Gnu-PR-Package: gzip Reply-To: 67022 <at> debbugs.gnu.org Date: Thu, 09 Nov 2023 17:42:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gzip@HIDDEN If you wish to submit further information on this problem, please send it to 67022 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 67022: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67022 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: Paul Eggert <eggert@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Thu, 09 Nov 2023 18:34:02 +0000 Resent-Message-ID: <handler.67022.B67022.169955481318022 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: Young Mo Kang <kym327@HIDDEN>, 67022 <at> debbugs.gnu.org Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.169955481318022 (code B ref 67022); Thu, 09 Nov 2023 18:34:02 +0000 Received: (at 67022) by debbugs.gnu.org; 9 Nov 2023 18:33:33 +0000 Received: from localhost ([127.0.0.1]:48707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r19qO-0004ga-TE for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 13:33:33 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:34374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1r19qL-0004gL-DH for 67022 <at> debbugs.gnu.org; Thu, 09 Nov 2023 13:33:31 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id C103E3C011BDC; Thu, 9 Nov 2023 10:32:43 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id M5nbw4KUL5eM; Thu, 9 Nov 2023 10:32:43 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 879C33C011BDA; Thu, 9 Nov 2023 10:32:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 879C33C011BDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1699554763; bh=v8+XiCNZqHwK4s479dXEPdNO6k424sKN27MvroFFuWE=; h=Message-ID:Date:MIME-Version:To:From; b=CgAApop11El372zqs8aTvvJeQBwTESdQVgRVZ4WDeliXc0COa4ffEiEdMm4eFxfjc 7x7YHIx4r6DR3yqLOUzn6DqZ9J8IdD0sSpTkTGoTSGIpV1Z9GwqL4aL3z6tu5JnZuv +Fc1AYv3mV1kQe3ZsrgZrBS/XtxmPyFkj7hSu+JvTi5XYejYRP9cb+sob1ricd7hNo 8EJLYC84WvzDACrTSVhMXLRGuGR+10Y03FNwn/T7BCFv++jUex2ggZlu27v+VoJDZN RWHfhWDBaVQAXcimJmiuuLCEXAnBH8r6snymO3CTijPMCPHk0JjhG0LSAvXoJM1+Vl bysrNKTBzuhsQ== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3WTSw8et19-V; Thu, 9 Nov 2023 10:32:43 -0800 (PST) Received: from [192.168.254.12] (unknown [47.148.192.211]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 63E9B3C011BDC; Thu, 9 Nov 2023 10:32:43 -0800 (PST) Message-ID: <e703aea9-aa26-4b03-a20f-5d7b32ab3d44@HIDDEN> Date: Thu, 9 Nov 2023 10:32:43 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> From: Paul Eggert <eggert@HIDDEN> Organization: UCLA Computer Science Department In-Reply-To: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 2023-11-09 09:40, Young Mo Kang wrote: > Since both GNU Gzip and zlib are written by the same authors, I was > wondering if GNU Gzip can share zlib's CRC32 calculation and obtain this > performance gain--I am not sure if there would be a license issue though. Shouldn't be a license issue. It's just a lack of time issue.
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> In-Reply-To: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Thu, 14 Mar 2024 02:48:03 +0000 Resent-Message-ID: <handler.67022.B.171038448113262 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: 67022 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gzip <bug-gzip@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.171038448113262 (code B ref -1); Thu, 14 Mar 2024 02:48:03 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2024 02:48:01 +0000 Received: from localhost ([127.0.0.1]:47670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkb8T-0003Rd-8e for submit <at> debbugs.gnu.org; Wed, 13 Mar 2024 22:48:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:41150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rkZh4-0006qT-10 for submit <at> debbugs.gnu.org; Wed, 13 Mar 2024 21:15:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <wrotycz@HIDDEN>) id 1rkZgU-0004xQ-7I for bug-gzip@HIDDEN; Wed, 13 Mar 2024 21:15:02 -0400 Received: from mx-out.tlen.pl ([193.222.135.140]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <wrotycz@HIDDEN>) id 1rkZgQ-0001KV-Tu for bug-gzip@HIDDEN; Wed, 13 Mar 2024 21:15:01 -0400 Received: (wp-smtpd smtp.tlen.pl 32573 invoked from network); 14 Mar 2024 02:14:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710378894; bh=j6mAS0LqHXYr++CLC4dcHnE68KIpfDk0j0S5ls7Cpco=; h=Subject:From:To; b=V/n5mnh8ft/luDoKI6RSGfJ9SkUDYyDjjoo4cqLv7n5/0YJZtnEBkGwKMjONPdThn jKP5SwGmm5EY2H4OTW9Zf/qZIQRYmKNghNPzWdH0sKZexB6k9NgmGoBFSVEjRldHf5 26O+ngs6HIbRv6SKoPhghQsTp9lD9VJXPWEMqz7Q= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <bug-gzip@HIDDEN>; 14 Mar 2024 02:14:54 +0100 Content-Type: multipart/mixed; boundary="3SDOJXUSDLJMMLPQDRBVJnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: HA-- Date: Thu, 14 Mar 2024 02:14:54 +0100 X-Draft-Variant: new X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> X-WP-MailID: 945866569f2da1318335d7af95958ad7 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [scNU] Received-SPF: pass client-ip=193.222.135.140; envelope-from=wrotycz@HIDDEN; helo=mx-out.tlen.pl X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Wed, 13 Mar 2024 22:47:58 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) --3SDOJXUSDLJMMLPQDRBVJnhgwp Content-Type: multipart/alternative; boundary="10HRHLDDXTJVCSCNTBMDMJnhgwp" --10HRHLDDXTJVCSCNTBMDMJnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 I tried to implement this slice-by-8 CRC but couldn't do it the way I w= anted - without bloated zlib tables and stuff. Maybe because I don't ge= t what updcrc(), getcrc(), setcrc() are and what they actually do. The whol= e program is magical, there is no way to find do_de/compress(), nor anythin= g like that, so it was difficult to actually find relevant code. But anyway= , for a start I manged to make `makecrcs8.c' to generate CRCs lookup ta= ble (attached). Regards wrotycz=0D --10HRHLDDXTJVCSCNTBMDMJnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <br><div>I tried to implement this slice-by-8 CRC but couldn't do it the wa= y I wanted - without bloated zlib tables and stuff. Maybe because I don't g= et what updcrc(), getcrc(), setcrc() are and what they actually do. The who= le program is magical, there is no way to find do_de/compress(), nor anythi= ng like that, so it was difficult to actually find relevant code. But anywa= y, for a start I manged to make `makecrcs8.c' to generate CRCs lookup table= (attached).<br></div><div><br></div><div>Regards<br></div><div>wrotycz<br>= </div><div><br></div><br> --10HRHLDDXTJVCSCNTBMDMJnhgwp-- --3SDOJXUSDLJMMLPQDRBVJnhgwp Content-Disposition: attachment; filename="=?utf-8?b?bWFrZWNyY3M4LmM=?=" Content-Id: <0aa0b75434b4ea6f5e2d61f2dbc13fbb> Content-Transfer-Encoding: base64 Content-Type: application/octet-stream 77u/LyogTm90IGNvcHlyaWdodGVkIDE5OTAgTWFyayBBZGxlciAqLwoKI2luY2x1ZGUgPHN0ZGlv Lmg+CgppbnQKbWFpbiAoKQovKgogICAgR2VuZXJhdGUgYSB0YWJsZSBmb3IgYSBieXRlLXdpc2Ug MzItYml0IENSQyBjYWxjdWxhdGlvbiBvbiB0aGUgcG9seW5vbWlhbDoKICAgIHheMzIreF4yNit4 XjIzK3heMjIreF4xNit4XjEyK3heMTEreF4xMCt4XjgreF43K3heNSt4XjQreF4yK3grMS4KCiAg ICBQb2x5bm9taWFscyBvdmVyIEdGKDIpIGFyZSByZXByZXNlbnRlZCBpbiBiaW5hcnksIG9uZSBi aXQgcGVyIGNvZWZmaWNpZW50LAogICAgd2l0aCB0aGUgbG93ZXN0IHBvd2VycyBpbiB0aGUgbW9z dCBzaWduaWZpY2FudCBiaXQuICAgIFRoZW4gYWRkaW5nIHBvbHlub21pYWxzCiAgICBpcyBqdXN0 IGV4Y2x1c2l2ZS1vciwgYW5kIG11bHRpcGx5aW5nIGEgcG9seW5vbWlhbCBieSB4IGlzIGEgcmln aHQgc2hpZnQgYnkKICAgIG9uZS4gICAgSWYgd2UgY2FsbCB0aGUgYWJvdmUgcG9seW5vbWlhbCBw LCBhbmQgcmVwcmVzZW50IGEgYnl0ZSBhcyB0aGUKICAgIHBvbHlub21pYWwgcSwgYWxzbyB3aXRo IHRoZSBsb3dlc3QgcG93ZXIgaW4gdGhlIG1vc3Qgc2lnbmlmaWNhbnQgYml0IChzbyB0aGUKICAg IGJ5dGUgMHhiMSBpcyB0aGUgcG9seW5vbWlhbCB4XjcreF4zK3grMSksIHRoZW4gdGhlIENSQyBp cyAocSp4XjMyKSBtb2QgcCwKICAgIHdoZXJlIGEgbW9kIGIgbWVhbnMgdGhlIHJlbWFpbmRlciBh ZnRlciBkaXZpZGluZyBhIGJ5IGIuCgogICAgVGhpcyBjYWxjdWxhdGlvbiBpcyBkb25lIHVzaW5n IHRoZSBzaGlmdC1yZWdpc3RlciBtZXRob2Qgb2YgbXVsdGlwbHlpbmcgYW5kCiAgICB0YWtpbmcg dGhlIHJlbWFpbmRlci4gICAgVGhlIHJlZ2lzdGVyIGlzIGluaXRpYWxpemVkIHRvIHplcm8sIGFu ZCBmb3IgZWFjaAogICAgaW5jb21pbmcgYml0LCB4XjMyIGlzIGFkZGVkIG1vZCBwIHRvIHRoZSBy ZWdpc3RlciBpZiB0aGUgYml0IGlzIGEgb25lICh3aGVyZQogICAgeF4zMiBtb2QgcCBpcyBwK3he MzIgPSB4XjI2Ky4uLisxKSwgYW5kIHRoZSByZWdpc3RlciBpcyBtdWx0aXBsaWVkIG1vZCBwIGJ5 CiAgICB4ICh3aGljaCBpcyBzaGlmdGluZyByaWdodCBieSBvbmUgYW5kIGFkZGluZyB4XjMyIG1v ZCBwIGlmIHRoZSBiaXQgc2hpZnRlZAogICAgb3V0IGlzIGEgb25lKS4gICAgV2Ugc3RhcnQgd2l0 aCB0aGUgaGlnaGVzdCBwb3dlciAobGVhc3Qgc2lnbmlmaWNhbnQgYml0KSBvZgogICAgcSBhbmQg cmVwZWF0IGZvciBhbGwgZWlnaHQgYml0cyBvZiBxLgoKICAgIFRoZSB0YWJsZSBpcyBzaW1wbHkg dGhlIENSQyBvZiBhbGwgcG9zc2libGUgZWlnaHQgYml0IHZhbHVlcy4gICAgVGhpcyBpcyBhbGwK ICAgIHRoZSBpbmZvcm1hdGlvbiBuZWVkZWQgdG8gZ2VuZXJhdGUgQ1JDJ3Mgb24gZGF0YSBhIGJ5 dGUgYXQgYSB0aW1lIGZvciBhbGwKICAgIGNvbWJpbmF0aW9ucyBvZiBDUkMgcmVnaXN0ZXIgdmFs dWVzIGFuZCBpbmNvbWluZyBieXRlcy4gICAgVGhlIHRhYmxlIGlzCiAgICB3cml0dGVuIHRvIHN0 ZG91dCBhcyAyNTYgbG9uZyBoZXhhZGVjaW1hbCB2YWx1ZXMgaW4gQyBsYW5ndWFnZSBmb3JtYXQu CiovCnsKICAgIGNvbnN0IGludCBzbGljZXMgPSA4OwogICAgdW5zaWduZWQgbG9uZyBjcmMzMl9s dXRbc2xpY2VzXVsyNTZdOyAvKiBsb29rdXAgdGFibGUgb2YgQ1JDcyAqLwogICAgdW5zaWduZWQg bG9uZyBjcmM7ICAgICAvKiBjcmMgc2hpZnQgcmVnaXN0ZXIgKi8KICAgIHVuc2lnbmVkIGxvbmcg cG9seTsgICAgLyogcG9seW5vbWlhbCBleGNsdXNpdmUtb3IgcGF0dGVybiAqLwogICAgaW50IGk7 ICAgICAgICAgICAgICAgICAvKiBjb3VudGVyIGZvciBhbGwgcG9zc2libGUgZWlnaHQgYml0IHZh bHVlcyAqLwogICAgaW50IGs7ICAgICAgICAgICAgICAgICAvKiBieXRlIGJlaW5nIHNoaWZ0ZWQg aW50byBjcmMgYXBwYXJhdHVzICovCiAgICAvKiB0ZXJtcyBvZiBwb2x5bm9taWFsIGRlZmluaW5n IHRoaXMgY3JjIChleGNlcHQgeF4zMik6ICovCiAgICBzdGF0aWMgaW50IHBbXSA9IHswLDEsMiw0 LDUsNyw4LDEwLDExLDEyLDE2LDIyLDIzLDI2fTsgLyogKDB4ZWRiODgzMjApICovCgogICAgLyog TWFrZSBleGNsdXNpdmUtb3IgcGF0dGVybiBmcm9tIHBvbHlub21pYWwgKi8KICAgIHBvbHkgPSAw OwogICAgZm9yIChpID0gMDsgaSA8IHNpemVvZihwKS9zaXplb2YoaW50KTsgaSsrKQogICAgICAg IHBvbHkgfD0gMUwgPDwgKDMxIC0gcFtpXSk7CgogICAgLyogQ3JlYXRlIGJhc2ljIHRhYmxlICov CiAgICBmb3IgKGkgPSAwOyBpIDwgMjU2OyBpKyspCiAgICB7CiAgICAgICAgY3JjID0gaTsKICAg ICAgICAvKiBUaGUgaWRlYSB0byBpbml0aWFsaXplIHRoZSByZWdpc3RlciB3aXRoIHRoZSBieXRl IGluc3RlYWQgb2YKICAgICAgICAgKiB6ZXJvIHdhcyBzdG9sZW4gZnJvbSBIYXJ1aGlrbyBPa3Vt dXJhJ3MgYXIwMDIgKi8KICAgICAgICBmb3IgKGsgPSA4OyBrOyBrLS0pCiAgICAgICAgICAgIGNy YyA9IGNyYyAmIDEgPyAoY3JjID4+IDEpIF4gcG9seSA6IGNyYyA+PiAxOwogICAgICAgIGNyYzMy X2x1dFswXVtpXSA9IGNyYzsKICAgIH0KICAgIHByaW50ZigiXG4iKTsKCiAgICAvKiBDcmVhdGUg dGFibGUgZm9yIHNsaWNlcyAqLwogICAgZm9yIChpID0gMDsgaSA8IDI1NjsgaSsrKQogICAgewog ICAgICAgIGNyYyA9IGNyYzMyX2x1dFswXVtpXTsKICAgICAgICBmb3IgKGsgPSAxOyBrIDwgc2xp Y2VzOyBrKyspCiAgICAgICAgewogICAgICAgICAgICBjcmMgPSBjcmMzMl9sdXRbMF1bY3JjICYg MHhmZl0gXiAoY3JjID4+IDgpOwogICAgICAgICAgICBjcmMzMl9sdXRba11baV0gPSBjcmM7CiAg ICAgICAgfQogICAgfQoKICAgIC8qIFByaW50IHRhYmxlICovCiAgICBmb3IgKGsgPSAwOyBrIDwg c2xpY2VzOyBrKyspCiAgICB7CiAgICAgICAgcHJpbnRmKCIgICAiKTsKICAgICAgICBmb3IoaSA9 IDA7IGkgPCAyNTY7IGkrKykKICAgICAgICB7CiAgICAgICAgICAgIGlmIChpICYmICgoaSAlIDQp ID09IDApKSBwcmludGYoIlxuICAgIik7CiAgICAgICAgICAgIGNyYyA9IGNyYzMyX2x1dFtrXVtp XTsKICAgICAgICAgICAgcHJpbnRmKCIgMHglMDhseEwsIiwgY3JjKTsKICAgICAgICB9CiAgICAg ICAgcHJpbnRmKCJcblxuIik7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K --3SDOJXUSDLJMMLPQDRBVJnhgwp--
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: "Adler, Mark" <madler@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Thu, 14 Mar 2024 18:02:01 +0000 Resent-Message-ID: <handler.67022.B67022.171043927819153 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: wrotycz <wrotycz@HIDDEN> Cc: "67022 <at> debbugs.gnu.org" <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.171043927819153 (code B ref 67022); Thu, 14 Mar 2024 18:02:01 +0000 Received: (at 67022) by debbugs.gnu.org; 14 Mar 2024 18:01:18 +0000 Received: from localhost ([127.0.0.1]:50567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkpOH-0004yr-Jh for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:01:17 -0400 Received: from mail-bn8nam12on2094.outbound.protection.outlook.com ([40.107.237.94]:23550 helo=NAM12-BN8-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <madler@HIDDEN>) id 1rkpOD-0004ya-98 for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:01:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EopHF36aM1wKrnnmeqd5xGhBpG7zVKECzDr5tKDWP1tIBWI1qSN2vILnMHGhAbBfByLEaVe8/DeHdbcWSfSdek4fcM9PaCFNA/cbk1r0doSkx0x6dFuPSCVfEdnrwzHJ4KFWkog3S2CRQc+MgfKXMq14HmEytQahA3AKKrDJCAk2xPMMsHJhPPUeuYf0A+d/F0Zo/kttE4NAHJi/tokARd4KjFqC2bKmyVrZe08aFjNoSy3M/ppS7vS3nipkF1lwxvvb8mOFGakdq7qtwEYrlu23JUZyf7hHh3hsk52bl+dyp2MjNamwGY+AhbAr69ocNItR41DxB7JuEQuT0ksvmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GkfnlawCuOnbP1jjY2iq1D7moIKuDpVAPLDxuKsCtUQ=; b=hBzcqJbfksxHv5wjkA0zk34/OjRklHZRd+eyYjG540A9sCHD0vofRtIAn4PpUQjC40xIClCyUhGjeMCo8jiQqwvsg+Q7BP9AdTP5R8jMcBh2cJdhwU40Xzt0jZ36tGrUx93cnzNvOa/AiEEe7BQbtnoiYOWfkcLxphq9gEfV4jDZMfriX638XaL8QvNHaw3pTN0Or6trGV/YYUZaEggje709CMXUAQBGgqQxItbEW1xX+uCsN2Fv6xfI/54a5CirfLBfHP2SbVllKKCJ/sDQGUGf4ZFJRC1dK9LGnG2iUyH3eTOO2sSoJw1dWtfcLsYYFUM2+se4A7CjLMfMN/kg0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=alumni.caltech.edu; dmarc=pass action=none header.from=alumni.caltech.edu; dkim=pass header.d=alumni.caltech.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni.caltech.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GkfnlawCuOnbP1jjY2iq1D7moIKuDpVAPLDxuKsCtUQ=; b=gM9z13LXEXfk1gVph3OZFVS51P7iEy0FyFGknKug0qjwHNQsOaUtorSrjkJtYK9fksCDHV8TssX7yxPkJ99L08brRxmYmMZw8APWyAkmSo6pmKdoKRTtnrYECUSlnklAKecJQz+pA2wOioVcqsAeKEUTeQ95AoJOMV6R5H2QwBqC4vQYUaKVWHtsU3mhHP9775xgTehyaFQQBVAAu2J03aEHg4UHEGggq1sQLZlCU4SYiaJL3lkF9MeBqumAvb8GklRGFQBgH6gEw2RCF5jRfUWGrr/xcgcX3Ps76I3pKeK11iHsEfh4EDaMxzljihAdcNZtxDSX5x/HVkxepKC74w== Received: from BYAPR03MB4374.namprd03.prod.outlook.com (2603:10b6:a03:c5::25) by SA1PR03MB6500.namprd03.prod.outlook.com (2603:10b6:806:1c7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.18; Thu, 14 Mar 2024 18:00:30 +0000 Received: from BYAPR03MB4374.namprd03.prod.outlook.com ([fe80::716d:bf0a:cbdb:4c5f]) by BYAPR03MB4374.namprd03.prod.outlook.com ([fe80::716d:bf0a:cbdb:4c5f%7]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024 18:00:30 +0000 From: "Adler, Mark" <madler@HIDDEN> Thread-Topic: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Thread-Index: AQHaEzQCBUeiFjfTRESMeQAWk9Q/EbE3M6IAgAEY6gA= Date: Thu, 14 Mar 2024 18:00:30 +0000 Message-ID: <CA1A2A8F-D1B5-4138-B286-0437FE2F0166@HIDDEN> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> In-Reply-To: <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.400.31) authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=alumni.caltech.edu; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR03MB4374:EE_|SA1PR03MB6500:EE_ x-ms-office365-filtering-correlation-id: 5237d070-13be-404f-b07d-08dc4450a322 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: X2NMwqoKI+udT2t9FGo6Lsrn2bcpHonT9isgSTGfm/Drr4LWf8lPx4zS424WfomeXsN24vVTMUXDlhPfFvjL+I+WRzxY54BgXCI9eUt3TG6dQT8JnBZbRH9nTBMVdWZs6/ySBFOH+VWmieNixDg4akHqgkgECZopsZxXhDadeAp645aiHeCKErg9eeJ6xxsYqvdenQVxgHzCRH6w6MttoYkGB6/bTsol16kB+o/vBnboe8arHddvqr3Yy+lxHkZ0Sdvo8SWNXxbFgqi2ZOlfZ57mOzylmKRaIyNheUX85c5g3IzSNseQq3qCHH6E8I/+U+PGHpba3hSEtmUpnz1OXjkryhNiNmJb/FwJUlwny/V6/++u3arNM5dxT9/6SnXjk+tmziHaaLdIC50ck8pHLlA3fVvSR4mhkxWGPlLY9Dtmj/bKLSKgBw//qw1PJ2BtCqxb58U+WWn/r7nX2YgmJBQY9fW7gvlTY9qFcS05HLQN2ExJGcYQImPDQO5/4Dfyo0hWXjjWGkoK+ZjmxG1ekl8JPxpAz3pGohU1vfmMIFYFtVYdc+nCOi0nQPu2RNbPTN9ScmP+c0kCHWsRI1GjzPn1hL6NwPjrWQuh6u8PuHQTIjhocMLnBZku3J4+Me506P18xzCRmSOVzcn4xlBioo5bA70ee62kbXQdfieJ4TPCamxRMceUxIT3wfV54QxGIklzS9E6MGX0Jk6inncOD58RZiU9lGHwrFh9Z/vQYGM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR03MB4374.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: WdYCGYvr1eoVavqttRnBfswzNa3RS9dadHnfw92+/K8r8jbjYoXOAjO9UzIE4M1C2XK6xtA9z6rtLIWRR3TRJTYilM8qAYGlXmX6E4GyaG7jU3pNk1AurcBye/snEzxDu25KGgZ4txqS7aLd6FKoiRKpnbun/qrFfX0vvWoiBWQYHAEvtYw+RP3Pbvt4TiO8GwB4SIrqjJaAhSnFNalaSigu5Jb/1e4l7o8T0NJOSHANgZsS6npJSlyi5F6aprEszG4c2NoI0hjC340npuJrxpCi/CAT8MBuIYoNrTxKTBTHDIMSqdBQn5o97dftGo8Q3oX/ZxSr+nkMiqVoZiO2mbSrvg4o1sxzyTZIVhVEXJ5yYQggiW0hYmqum6mfwz1FPEN+B6/2K7W5N7+f8Sgun/OmWrKn8w1pD+0oONR/7ZkH7yoho2Hp0oXE8+7G3Ro1wt5HyBgh+cRcWgox0/35ygRoUIzvq+Wqc2fe7x670eYuw6qJ5ZEp88UPfoz6W/BRBeZ+9llnnjpmZTem/EnFHfFiwgEgB3Z+Cyo9/nJzuFCdCX+vkedqS0SzgaVyGXoHh3F38yTXI8TJlf2zA14NNHlSj4XXdN9Nn/2CkHQUt0kSF6O3UQu9+ugwVm1+/uyaYJW0U2jtrC6T2L/7+qn0ovQYMthRyDzIzzSbalH7LiNQPEqzuRKdBn/czgNrdpNZ7vSR3y0NN7fpEaLvPwgG//sLrg+EyQ9bQZuFmNTG2PI2ZeYUbD4ckB/C26dYUMD/HT6koaGS3gGkLBvGnxSOWmOOF77gPLV3aDoAR+3Sl6LxeBWPoLJZG1QFvE3wWCjw76iU1qwz6UIQEf4PvfEsS1f4+hTh/UCVw+Zo58MTDYyeYu+4+5AotEhdOhQY/oB7FWz2pPnoQIcI1XsqOdnxWjbmk9LeOSVUFGif7s5G+e+mVIdm8/8sMeQPN9sSNRfGaGHuKva2V5PRJxhljqne20pPQuZxJOZTkyTG1PuhPSwYOI8fM5R4VP5D3CLPFesSKHLffNpuBCEX8g/vmjHeI9/7YFsalNpz9urBiB8Wn1HQvFfN0DhxmMdsBrQsad853AltF77nMY7IfoKL1hmz2IfeiTX0DXgm5RAk6X+XZ7MAanfbsdP6t2AdCpjvYAj7Fx6p/pxFfwg6YAK9427k/ct25w6KTYVuY7xvjjzgKa2Gx7Wb/lnsHw+jrxxsXYzMaSl+JXiPEu/wKfeJCZQtzbfjm/LLuHjnDVEMgApnRm+og7latW7mPkhThGCp+PLlERyVosuSGERciWfSz5p3aNo8VqHnXASI3+M/uu7mXws07F2S41Zs5wjcbinGSa5RfDIAe/uUbNUejQZwE7/OQ87IOV3rx9179c2ALxxRm6xjQm4gC6aShXnQKj9PHbc9zq1yCpOP4Y/DPClEWim/UGcv+y988XjR29Tt++tuZpw6PAQUvKibzEPb1WRAOfP3QMTpZYQVwqw9Jjqv4eGVCBqOvuAPLPziraYf1k+MpCw4SW6i4rcizu2u3/QB/6tADxPv4EKSk7p0PH/nakFSwlHPGRDXF5whDcqAO8nVxRohypXLpOkj933JAnv74tn4K9JKsQQXwxGfuYx/SI2bQqEU/n7PGe/FxsxedQ8gw/hsIGSD4eqB8tjrg2EQVhnE Content-Type: text/plain; charset="utf-8" Content-ID: <D92B915CC389E945B635D4C86705187F@HIDDEN> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: alumni.caltech.edu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR03MB4374.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5237d070-13be-404f-b07d-08dc4450a322 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 18:00:30.4546 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fd5be9d9-7b72-4df9-830e-b1f9cc5b44bd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xsXZGLCy12xoDWdf+FkIBC/seQ5Ch/Q1drUGUEoD2hAlv4+FttAX1abRYYol0ehjJnniITD5v8F42XO3RWWD708CUYvUwRfboLg/LqWKmUJW7RWGlsSXSP1/8wXuWcNk X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR03MB6500 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) TXIuIFdyb3R5Y3osDQoNCknigJltIG5vdCBzdXJlIHdoYXQgeW91IG1lYW4gYnkg4oCcYmxvYXRl ZOKAnSwgYnV0IGFueXdheSwgdGhlIGN1cnJlbnQgY29kZSBpbiB6bGliIGZvciBDUkMtMzIgZG9l cyBub3QgdXNlIHNsaWNlLWJ5LTguIEl0IHVzZXMgYnJhaWRzLCB3aGljaCBpcyBmYXN0ZXIuIElm IHRoZXJlIHdlcmUgZ29pbmcgdG8gYmUgYSByZXBsYWNlbWVudCBmb3IgdGhlIHNvZnR3YXJlIENS QyBpbiBnemlwLCBpdCBzaG91bGQgc3RhcnQgdGhlcmUuDQoNCkl0IGNvdWxkIGFsc28gZmluaXNo IHRoZXJlLCBzaW1wbHkgYnkgY29weWluZyBhbGwgdGhlIGNvZGUuIEl0IGlzLCBhZnRlciBhbGws IG9wZW4gc291cmNlLg0KDQpBcyBmb3IgdGhlIOKAnG1hZ2ljYWzigJ0sIGFueSBzdWZmaWNpZW50 bHkgYWR2YW5jZWQgdGVjaG5vbG9neSBpcyBpbmRpc3Rpbmd1aXNoYWJsZSBmcm9tIG1hZ2ljLiAg Oi0pDQoNCk1hcmsNCg0KDQo+IE9uIE1hciAxMywgMjAyNCwgYXQgNjoxNOKAr1BNLCB3cm90eWN6 IDx3cm90eWN6QHdpci5wbD4gd3JvdGU6DQo+IA0KPiBJIHRyaWVkIHRvIGltcGxlbWVudCB0aGlz IHNsaWNlLWJ5LTggQ1JDIGJ1dCBjb3VsZG4mIzM5O3QgZG8gaXQgdGhlIHdheSBJIHdhbnRlZCAt IHdpdGhvdXQgYmxvYXRlZCB6bGliIHRhYmxlcyBhbmQgc3R1ZmYuIE1heWJlIGJlY2F1c2UgSSBk b24mIzM5O3QgZ2V0IHdoYXQgdXBkY3JjKCksIGdldGNyYygpLCBzZXRjcmMoKSBhcmUgYW5kIHdo YXQgdGhleSBhY3R1YWxseSBkby4gVGhlIHdob2xlIHByb2dyYW0gaXMgbWFnaWNhbCwgdGhlcmUg aXMgbm8gd2F5IHRvIGZpbmQgZG9fZGUvY29tcHJlc3MoKSwgbm9yIGFueXRoaW5nIGxpa2UgdGhh dCwgc28gaXQgd2FzIGRpZmZpY3VsdCB0byBhY3R1YWxseSBmaW5kIHJlbGV2YW50IGNvZGUuIEJ1 dCBhbnl3YXksIGZvciBhIHN0YXJ0IEkgbWFuZ2VkIHRvIG1ha2UgYG1ha2VjcmNzOC5jJiMzOTsg dG8gZ2VuZXJhdGUgQ1JDcyBsb29rdXAgdGFibGUgKGF0dGFjaGVkKS4gICBSZWdhcmRzICB3cm90 eWN6DQo+IDxtYWtlY3JjczguYz4NCg0K
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: "Adler, Mark" <madler@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Thu, 14 Mar 2024 19:49:01 +0000 Resent-Message-ID: <handler.67022.B67022.17104457278576 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: wrotycz <wrotycz@HIDDEN> Cc: "67022 <at> debbugs.gnu.org" <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.17104457278576 (code B ref 67022); Thu, 14 Mar 2024 19:49:01 +0000 Received: (at 67022) by debbugs.gnu.org; 14 Mar 2024 19:48:47 +0000 Received: from localhost ([127.0.0.1]:50716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkr4J-0002EE-9Q for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 15:48:47 -0400 Received: from mail-sn1nam02on2137.outbound.protection.outlook.com ([40.107.96.137]:4931 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <madler@HIDDEN>) id 1rkr4H-0002DR-26 for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 15:48:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WYYqdo4+kQSsOQfVYIPORcIzGBl+zmk9C/e6Wk8+vctaFfUAT8OdV27RW69dGEEQVqnUicSUI6tD+EP+7UgESBySmiQUd0VSjJgE2QdmHMHtmryHG850TxPbfgNx7Apz6eaou6YzVPiSCeHuGfHnvdGGKJXwI4FRpZIS/0vuUEL8sCfmELjol7lb64SF/Jx20/qTnk41ykeoHGl2QFEiXJbXKTb20ipCycR/JSyvm+lnnx6f9UhXDNjOIWFR/N1k4aWiz9k9ByWsxyoSqXma+ovo6oWKrGKTV13khTDltWE27S5Nhr37WC9261Os91F7A+mp2t3/QLL116AbQtEaVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HVc4mjjoIvS+XktSDmI8Z3ljHoTcX+BOtO2a4Gy2+5Q=; b=XEYf4oCWjoEJDrR5jek7+wlPHE1S3+WmU+iiuQSeWzDS965KKlBS9BnWyoK77teTjAS4yRKxUJPQjKdNM+01hle3mIxYeKAT3v9ABgXzV97tc4+o7p4L1DYvdCi0gcuBKiPbbslnGdNF6PaUaD0qXUW/tds1K/fnNjO/KC1eXQH1lGL3PZ+u137F635WdcvphRvz4f8GDjYjSgK3VRec7Qlan8f9PIN+IndmDRRi193aQrWApimIHZn0dPvCZLQUj9ysaw/YgVQlxBaObTMobVzQ/CwDZAh44n5iNIc4hVk6h5d7Aoa+PpfIUG3EEy9V6s4iNsSxHOFhqmCXWS1AZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=alumni.caltech.edu; dmarc=pass action=none header.from=alumni.caltech.edu; dkim=pass header.d=alumni.caltech.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni.caltech.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HVc4mjjoIvS+XktSDmI8Z3ljHoTcX+BOtO2a4Gy2+5Q=; b=CwGIY+IOP4ga2gTZSPJXOcjWfugeiyhxddEAsqK2FF4r2QnsO8qvhBwuQM2/cy+kUedbaizVF5FPJjGirpsng68tflRM0C5ecCZvDbBYYt6vu8NihdXRS7Sg69sYJbdeeGuSMSOKKgSGB/CIkZ0PbovEoLseC5/hiQLme9SA+52I83161iCvL52G5u6PPdRksBoUPaZkEOCpXccz4W7qVXV1nmt+gmond65pSvXvMSH8EnezYav3VcyvLRR3ZPcZveiJZVI4ChU5z3Qwuygft1lKT5gTXizJqD2rJnjUs3/ptm1sVYwoBlA7YZohw6lxDx3ml9ooGTN1vJ2usYG76A== Received: from BYAPR03MB4374.namprd03.prod.outlook.com (2603:10b6:a03:c5::25) by SA3PR03MB7466.namprd03.prod.outlook.com (2603:10b6:806:396::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21; Thu, 14 Mar 2024 19:48:01 +0000 Received: from BYAPR03MB4374.namprd03.prod.outlook.com ([fe80::716d:bf0a:cbdb:4c5f]) by BYAPR03MB4374.namprd03.prod.outlook.com ([fe80::716d:bf0a:cbdb:4c5f%7]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024 19:48:00 +0000 From: "Adler, Mark" <madler@HIDDEN> Thread-Topic: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Thread-Index: AQHadkiF/oGpawIoTku5pw5qB+z7wA== Date: Thu, 14 Mar 2024 19:48:00 +0000 Message-ID: <C4431D22-729E-495C-B10A-FBE8E93DE747@HIDDEN> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> <CA1A2A8F-D1B5-4138-B286-0437FE2F0166@HIDDEN> <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> In-Reply-To: <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.400.31) authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=alumni.caltech.edu; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR03MB4374:EE_|SA3PR03MB7466:EE_ x-ms-office365-filtering-correlation-id: 5b7b59f1-e07b-42c5-6db3-08dc445fa7c9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EW0f5HMYUkZ8o2OPiPXmDqGrLM3betL6KETdethCQbNoRur372gkeAQ13UYE9qG4MCPYmWOMEdogkmQyWoiA78m21SeOQD6XkX0A+2BPgpYReHaTdDmoRmMynjDl+rVLNAghdlISAP1uL262hrbC4MjedClnig6Ti7/0M0i0V/zDppIYd4WCzSUlpVnfwHwLcyktJk7PMkONWOhOU0x/kkl+aqGpnh3hn/61HYmu9ArNwXDMB0rNIzSMl6VTtYvefQi/um/gPOuQhsbAOew18SpvUgbqIC2MinbndHZcSMGyVICGkZLjNnXn1CjR60Zxum4uFg7OoRw77C01fXDEf0YAFL3TLxFXkDs3JQdhn40xaHE6qi3DgB6T3o3NFA4rmUIpIbhdjKHzTee6nAERd4s24vSFG4Kij5x0tGLcDrTbJeyOyn7lgngYZK94K41U8rczgZCZ/RiEl/SvQLyB3BkrfJO4b9DVfmVIyptwyupP4oPbATJjuTK7FM7AOeIyO3fyM5MF+CjmoDPo3HKySo7/6vOQPVMeLHt0nS+MMe0nM5uasCAHMwHaZTYvaD18evA+/RmLfFQP8nXctlA5ZI49TjZg3MzF+tBHuKlJb5fwYzucxQR+kZM1qUtEvFw9dH0jPc7I5DSQWbqmejqP7LS5J/YDZBwjEK/qi1zHJgFhHlmK9LV1fNRgM4I1D7ok0TnbrzRAOhbeiyj00o4TuNmMM793FoKqJ6Z8JDzoZs0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR03MB4374.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: 3LPpLGh6ENlTZ0LSxfBvdCKvwZlsv6ax91tkWLWxRJJgVQ5s6az6/f0T83XLdEJXbftlXqW9nxif7PAW8x9tiZB8zjQ00wH6m3h3s0TtYOJ4QklY2Yb/pl7Vb1Pp2eRYlg368fd99aJWRwaGIGujnYCK9B7v5dsbPtR+GZc3JFkuNZA5oI6+EfjDrOMOT0wdVx9iCIDQ0J6sJjOqz/c5R5xeIGdQKlKzHB8lciEAVQb0XyVrcYiws268WaK4EN1lWpxMnddW5QY7Abp7uzX8S2+2y0Dmv1T/J1uJ8YTpaUpLOfqsb+Wb70az/ZtYVSc+UTlb2LfROTxy0X0JfPZo5NBQmYjzwZNmEIjyfhmgpnJs6wWoEi3vMhaWIgpRbANB8GpUlAamtOrwOFN2R4Y1PmwzpYYZUu0eBZOyJyyccCrZKm9wpfYSXG3jKtxLOWP1yVWz+NZBPAAZ9M+gb2s6fd9NTjyZza2gyF1p87gOc3Lcatkg80A0Qh2G85r8H3eiyfLtAyp9yqtBg0AFbH8hsEeatJxAFXmLjsV8wovOhl/j0whlVtfw0iylaoVe6QH6jaG5n+1axjXktZWgoCfEki++RhuamnEU+r4mqEZ2zYQ7ifgczommQPjmxp1kq7l0FNY+f/+5OFhvbHaCa/iTfemE4W2koGIX9GMNTX539lsSEbtBqccSnItF48hvwWsQpJuXN1uJR/l7/cYl3EIolW69hM0pKytodAd8BMampE1vSQMKhMpHALpzj8RDxeEvWgcKcPDJPXJoE6L/EPfZCmIaXtvTqL2XgJ/NLbCXXXn1kZNMGCrp1GjL73njtsNCLydGEGPvqf9z+nYsKZbS65AoM4CEVHYOte/wEQqCUa5rpmD0hm1aF6TkNIIb98Xu2NSVJsZYtpja2cO3SdBCq3oK2K6+mvYaciRxlmJWCzo8qAzDohCAZAe89CgVgNZiSEx+OrWXn2WfPPwNAVhVPlKiOCOvuzZY+p0NTb7ZP3vGv0lZHejUlUEPzIMO2SA7njUZkfVvX8OWnP7RpxyFVufiLu+9I57YEShQfGzZkyHlT/dsRWVMHEDpjYvAU+5M+HoGiukGD5qALzboMMlc8ReTAgqC64lupsE2oQDWciUDzU/JgOERDj5blarJJfbyXb/T2P9oloJBD/l0kHfUG0oCZmjvloWACBAx0ghHC4+MXAepx/9FxSVlIfxt3NbAJnZhOQ+NhMzQ71emkQFQGCAZSTM3Kum+bWfJM4bugQqoqeQxHkT7EBGw69CRNrrk/Kixx6radTuLiu8hdmxjry84AJq8ddPgAcNPbn5vojxUzuqJyDtuBdGVt97fITILSjxy49ynbl9102xUVPaydeAJZYOlzvYEDJ8F/Q9Tr4kTU1Jp4NGUjFLRyHYihH4HplwfQ+OHZhVvvOwK+6h1zQbtuTHzPFVjxCVho8l0X+mGWKfE8SqfliNvufioDhvAoApXLxeH9JGeDqoJQI78jDNq4Onu+WubPvBDBM5lgBAiUzqp+Acib+AaDEZLxdZ+YwmmuXto1QARiQlIsZIYmISTe7t0id10xp9hK0FR2KLBFdTGrp2YrlM5Jhhwy1q6vjGCxdmfo6Q71LJjJ4CLXDtE530vFCoDESEytKA+jgGlkjg2PYgp5oqyLEyb1BzF Content-Type: text/plain; charset="us-ascii" Content-ID: <F57205B0FB066249A1A06FFF058D875E@HIDDEN> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: alumni.caltech.edu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR03MB4374.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b7b59f1-e07b-42c5-6db3-08dc445fa7c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 19:48:00.6827 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fd5be9d9-7b72-4df9-830e-b1f9cc5b44bd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3JncIvUhrA8/LrFaaOI6jMxDhFPhQeEMqZE/4kXxrupi4xoPaSyjO+6FOfW+nxIKR5cxsobblvyRv52ZmOlcfgYcqtDQxOFn/dIOSeQcalDFN4BCFraIL+6MDETos+U8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR03MB7466 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > And, again, due to level of complexity in the code, I didn't check it. I = have this quirk that I want to understand stuff I use, here I couldn't so I= didn't follow. >=20 > I will check that braids thing when I find something about it. The paper on braided CRCs is in the zlib distribution: doc/crc-doc.1.0.pdf = . I apologize for your nausea. I recommend Pepto Bismol.
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: "Adler, Mark" <madler@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Thu, 14 Mar 2024 22:59:02 +0000 Resent-Message-ID: <handler.67022.B67022.171045709430417 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: wrotycz <wrotycz@HIDDEN> Cc: "67022 <at> debbugs.gnu.org" <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.171045709430417 (code B ref 67022); Thu, 14 Mar 2024 22:59:02 +0000 Received: (at 67022) by debbugs.gnu.org; 14 Mar 2024 22:58:14 +0000 Received: from localhost ([127.0.0.1]:50938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rku1d-0007uW-L4 for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 18:58:13 -0400 Received: from mail-dm3nam02on2101.outbound.protection.outlook.com ([40.107.95.101]:57409 helo=NAM02-DM3-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <madler@HIDDEN>) id 1rku1Y-0007uD-Mm for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 18:58:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VB+1JRjRXiCo6O/x51i4TjtmOVR7QLZbnm9miFtNNjWN3KOT1m42vuo1l1EOjGscZnVslOon9cpPiN/WGim2NW4K6pM+5ALk2qauuxfy9QOveyEYEhdtYeLbebHu9JjEhVREzDJzYOrkjUrmcZpDm+1Tzrfg3VhWttSMsEW1wCClN3A0fuUt/um43hn8oloLfJpTcZN7XFu7RNYs6yHm3Cp54wUo8DFZjZUUszz1Fuzv8QUpevj59c7P3FfRPr7sCV4E8QyyP5K/bx++8eKNdUd0LI/kD6iWFGU5eQfU/ITcRWEQDDxPXPnlvBQB0ePW6MJmazslcHem3qljXD+XDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gHXbbqMgNJ7UJPHiZkABZAW/5182goNt8HkigCq4SCg=; b=bCWeh1ZNN4O0aMuSP+u2COL9tk0U5Ip6YGxLQXOF76tCqRB9zg5MwKQLR169B9CJNw5o8fGPbROuyR/ReFMbSAi1W1shoXzNMkZ+9sSCV4VmQ+8DIy3SO+aRZzqfJg0unRKdXL/vxAp5f7k8U+lM41y/mAijCbKf59r+3W2DDZPw1dvw0l9wqshEzMbLdAortRMOUQ7MR5L+rK7U+0gjVdLQPuOnMBLQR7X3N+diNPZuNOxIobK+QraqA6GvX6PduOhz7TnH6FNOzUvHWStBOaD7PAygnum8MavHuKDlLw6nMuJhXiXXrEMyST1U7kuGvgzS1LEN8FYhx0+FO6xMlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=alumni.caltech.edu; dmarc=pass action=none header.from=alumni.caltech.edu; dkim=pass header.d=alumni.caltech.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni.caltech.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gHXbbqMgNJ7UJPHiZkABZAW/5182goNt8HkigCq4SCg=; b=B8nVmNJygL2OJwXmQkIZdMuPAVaAQOpcBfFw8LywUPKHqkmiQ2OfWGqIxnpMvH7GWpHpDn/LwFs5rttOu8jJ8fADAJHA5KSmm7odDUsFlX+ATzG7+1zdWHkZ16HYRJc9YUkgUCv9/ovk08hbPthBwSF2aVnynX6LIRmMdku5K7g2vjgQPh0A1rRYndbjazvUFIfufk1Bs6NXfbFnnI1E5YaKpN5MH0dr4xJK7gSBRnBV+f/sqhzyI90WblzOzgXBwV2fLGiN2FoIO16hWvaOh5GJQ6KI7XN/lL13Xw84bQRzPzRwO7BhkQY815CRtwUmum/4mnfgmVCKZOmuygW0uA== Received: from BYAPR03MB4374.namprd03.prod.outlook.com (2603:10b6:a03:c5::25) by PH7PR03MB6941.namprd03.prod.outlook.com (2603:10b6:510:156::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20; Thu, 14 Mar 2024 22:57:24 +0000 Received: from BYAPR03MB4374.namprd03.prod.outlook.com ([fe80::716d:bf0a:cbdb:4c5f]) by BYAPR03MB4374.namprd03.prod.outlook.com ([fe80::716d:bf0a:cbdb:4c5f%7]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024 22:57:23 +0000 From: "Adler, Mark" <madler@HIDDEN> Thread-Topic: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Thread-Index: AQHadkiF9UL25aLJXUmq+IWs3y5kU7E31ksJgAADCgA= Date: Thu, 14 Mar 2024 22:57:23 +0000 Message-ID: <C3FD6E67-332C-449E-93B7-699F8303FF61@HIDDEN> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> <ca1a2a8f-d1b5-4138-b286-0437fe2f0166@HIDDEN> <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> <C4431D22-729E-495C-B10A-FBE8E93DE747@HIDDEN> <0cfccaaa801144719979ae046caff129@HIDDEN> In-Reply-To: <0cfccaaa801144719979ae046caff129@HIDDEN> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.400.31) authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=alumni.caltech.edu; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR03MB4374:EE_|PH7PR03MB6941:EE_ x-ms-office365-filtering-correlation-id: 6c5da3d6-9423-4a59-b5fa-08dc447a1cb2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PZKQJmOhCccEdJCx2Qb81I5dDJqvHZO56Yse40Q22bbnFIfQQxCJc93sY4ASl5NLlBs8ji7V9bo9hXFpXaRsLkpleQcavkmbBFDZrc5oEDL4zcpv81uvQWY6twc3qoJ3NXpeEELaLzyVEZJ+N06MgF+FgGLvF7KBAx9zvlAB7UKJz5LBHKAu3wSCyEB5osIlaJTcLVxksVanHyjHUCLJlTgSm7HoH9/uGt0lhbWu6Mz8krCOGsVvHgmy35htya2+O4aRVja7ZstUpVpawo0NjZ6QAxfeihwY+KuBpjRbGozMPFb9wBIbQw+eDU3qoG5hNovLydOszU7MZ/a6ECty68mDL3ih60a7lk+LrXi4XNrNnwLQAO9KJx+EvnNlm6c/M5xNxLOspDaCEr5lu70V7OOxtycUgljd26CEiDL2PZVncemfTcXwNjPYTdpeo8zvZxRE13+zGWVnAm/fvo/cOttkM0cID5ZhHF2TUVp/Vbg9dpJMRddUt5bwNzqTS7KjfhbvaLPN3wkVdSOp4m7kcouhoM1ukPVKcCA3wW/15fEJVrH3NU2GibjKob/1kr+joeSHwby3WovFNZR1x7YkkWGFOqwlz2Gx9NTFdZbV6ySxOUSpodL8Pa+jQkEX+26gekMLxLQmpn/Icqv3qlXCuTXkcsuLyJMyiOk9TyqBPDGYN/sgZ+TZ7awiWY0sYpFN x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR03MB4374.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: +FbTrO2043+4AVQThZQw+gqyfPXscyPJieAXw3H/SlKO7o6lHFGtOjp0cJ4xdjKAu5fivIMzG4Q4iV72NPLqEX9dKSHj9dmqabMztD2VJDQJrXCMhiHvIuciAERNxU4T38Fw9/I6P/KxPh54rK8mE0k8HhUt6UdKZDHYwYWPhA87YCVUSEueY0sr+HQGe+GRaCUMOd4gnEk/wcAYWE4n5vlJUH73Kf5bREbWJWFLPCJMy7c8AdMQzOrWweRbGPoGc7+G3PPHgtpnNRkpMHkBp3f0pE+WTsdBGG+XOSytQflTzclS9MbFKv0+BDxmw8sg+DIhwWeZhe+Lu3ink+SwXzX3l7dl0pufoHyApaU+SYvpzTKUsPSJEiZ3/TsPV7Abg4k5IJ5tjHnHYFfUi4HHRbs+gCu+ai9XvwMqiTVb4LUP3Ae/GBGXxPEuC3E1s8CIbEQAV5CCoEIaWp2XTklAm3k8bELbzbG2ERQUS7ML0ZS2daOFUVgXOeuLxnTsEufOQ7domkZ9yue6HW2Zzxc7Q1IjTYJxqeflcvtvfsnbbNDKLQVM6vzzM9+l4He79W4JFz/IaNDMMBVn8Df7L76fxvfAmrM80T8+gzKTaT5qsIi50bNSqNQQexdymWLCbbTTOhNusyomArlBQjVwMRpT31YNmdOgWQGTiHNF3Xd9i7MYWs7HCElavAQ7OmH0Afau3YcbHvfMfiV4F9qE3vmUqUe7Ei4Aie0ASJHiO/AvhvKmO/7V5wDgcOCfU6H72edlpjFty6FinDqRqs9lcltD9vbz7Lhap6ujql+2dHVggekT/YjFMRAojrlyvRT3IRzlGj1oj1eXadsRJvn3rYr1ujHJsr88VcpSEm89Q8Jqck65Zge2jKnSdnRLvH+/HeFmN6SxJJasK8BPHY/pqn01uq/p44EPpn9bFFqdDIBJjlZbgV0Jj3w5M4b+fnXyO8g8phEcr9H98c+6i5+vszVxvdE+V6SSCI1kn/uvysCl7VSWy3RU50+reBnF/5NvHqJb3ibLg+Kt7rwHsCDYwRK+VTO9ijXOCyLW0Jrk7r0le90ZyFbRlQ1jS+DZDIoCLwWNokovCBYbfxw1RVAaVqY8O766QpBfKHZEIT4puxaQ3G2hkEbpFgceJeFPoe3qtjnVSPLl468miDIl1czEwKerRJmvRnHBBhMWQ7LNhkcyYw6zxdidDkid91yOR8C4tQP1PNC2l+/G6+ZOxdKvm5iJ9abQfzBPpNLLdnVmNWhfMBh1CCp1x7Wk7mXXB+nsy/8kaAmyNLtSYC5vb/cbxSTTrpnOYbKW6x88RC27d1vS+J90emrOZxKfGv1Bx1UP8e36sDFyY7/hPJcS+dD601IyQdgCr9knB/MEStZhAYEwVM7SxCd8zGpL7zENla2hqpQ2eqvi6OJMc2c1LwhHmNOtKRc5rrvKt9OvYBISOJwRDh7ExF797kCRk1E5boPTqUuyuYOCB7KN9hmd20JxDc6QruKRc1huj3dqwlLuVxALiN63J+xg/F8efr4A6llDu5FpQ7WuPw13vi7wzTrmGAmB8LGPuaalBrkYm+CfbGBRsrWWO4AjwRrOg3E+0ZERsBXYfLBe8lduXr5hwHeY+pridW75thVxKvP6fI7s7e01M7q5hGxAuuV7QWLbAzhipDkC Content-Type: text/plain; charset="utf-8" Content-ID: <BD3273415410E24E94A6EC6C9A110D9D@HIDDEN> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: alumni.caltech.edu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR03MB4374.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c5da3d6-9423-4a59-b5fa-08dc447a1cb2 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 22:57:23.7359 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fd5be9d9-7b72-4df9-830e-b1f9cc5b44bd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 60SJ9aZJOuE4OrRdB1Co14M4ciOWVzG9j4d9P24JAEp21nguOcDkfonxoI0l71siR1vlcHTkg8JVx1jPk+IawfCdUhdkPmj5IGgdvIUmb0v4Gf3r7/GG0JrmDBeB7rSY X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR03MB6941 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) T24gTWFyIDE0LCAyMDI0LCBhdCAzOjQ24oCvUE0sIHdyb3R5Y3ogPHdyb3R5Y3pAbm90LnJlYWxs eT4gd3JvdGU6DQo+IA0KPiANCj4gRGVzcGl0ZSB0aGF0IHRoZSBxdWVzdGlvbiBpcyBob3cgZG8g SSB1c2UgemxpYiBjcmMzMigpPyBJdCBkb2Vzbid0IGdpdmUgbWUgY29ycmVjdCByZXN1bHQuDQo+ IA0KPiBNeSAncmlnJyBpcyB0aGlzOg0KPiANCj4gfn5+DQo+IGNyYyA9IC0xDQo+IHdoaWxlIChi dWZmZXIsIGxlbmd0aCA9IHJlYWRfZGF0YSgpKToNCj4gICAgIHsNCj4gICAgIGNyYyA9IGNyY2Z1 bmMoY3JjLCBidWZmZXIsIGxlbmd0aCkNCj4gICAgIH0NCj4gY3JjID0gfmNyYw0KPiB+fn4NCj4g DQo+IFRoaXMgZG9lc24ndCB3b3JrIHdpdGggYGNyYzMyX3ooKTvigJkNCg0KWW91IHdvdWxkIG5l ZWQgdG8gcmVhZCB0aGUgZG9jdW1lbnRhdGlvbiBpbiB6bGliLmggaW4gb3JkZXIgdG8gYmUgYWJs ZSB0byB1c2UgaXRzIGNyYzMyKCkgb3IgY3JjMzJfeigpIGNvcnJlY3RseS4gRnJvbSB6bGliLmg6 DQoNCiAgIFVzYWdlIGV4YW1wbGU6DQoNCiAgICAgdUxvbmcgY3JjID0gY3JjMzIoMEwsIFpfTlVM TCwgMCk7DQoNCiAgICAgd2hpbGUgKHJlYWRfYnVmZmVyKGJ1ZmZlciwgbGVuZ3RoKSAhPSBFT0Yp IHsNCiAgICAgICBjcmMgPSBjcmMzMihjcmMsIGJ1ZmZlciwgbGVuZ3RoKTsNCiAgICAgfQ0KICAg ICBpZiAoY3JjICE9IG9yaWdpbmFsX2NyYykgZXJyb3IoKTsNCg0KVGhlIGluaXRpYWwgdmFsdWUg cmV0dXJuZWQgYnkgY3JjMzIoMEwsIFpfTlVMTCwgMCkgaXMgMCwgbm90IC0xLiBBbmQgdGhlcmUg aXMgbm8gcG9zdCBpbnZlcnNpb24uIFRvIGdldCB5b3VyIHRlc3QgY29kZSB0byB3b3JrLCBpdCB3 b3VsZCBuZWVkIHRvIGJlOg0KDQo+IGNyYyA9IDANCj4gd2hpbGUgKGJ1ZmZlciwgbGVuZ3RoID0g cmVhZF9kYXRhKCkpOg0KPiAgICAgew0KPiAgICAgY3JjID0gY3JjMzJfeihjcmMsIGJ1ZmZlciwg bGVuZ3RoKQ0KPiAgICAgfQ0KDQoNCg==
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Fri, 15 Mar 2024 05:10:01 +0000 Resent-Message-ID: <handler.67022.B.17104793447172 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: 67022 <at> debbugs.gnu.org X-Debbugs-Original-To: 67022 <at> debbugs.gnu.org <67022 <at> debbugs.gnu.org>, bug-gzip <bug-gzip@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.17104793447172 (code B ref -1); Fri, 15 Mar 2024 05:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Mar 2024 05:09:04 +0000 Received: from localhost ([127.0.0.1]:51093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkzoT-0001rG-IX for submit <at> debbugs.gnu.org; Fri, 15 Mar 2024 01:09:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:53492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rkooF-0001IC-9O for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 13:24:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <wrotycz@HIDDEN>) id 1rkone-00050s-Ux for bug-gzip@HIDDEN; Thu, 14 Mar 2024 13:23:27 -0400 Received: from mx-out.tlen.pl ([193.222.135.140]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <wrotycz@HIDDEN>) id 1rkonb-0007dv-IF for bug-gzip@HIDDEN; Thu, 14 Mar 2024 13:23:26 -0400 Received: (wp-smtpd smtp.tlen.pl 44185 invoked from network); 14 Mar 2024 18:23:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710436997; bh=qO4Ii/oLGeHZFEzp2nDTpy0qyWGwpwFgPMR+aNfGGtk=; h=Subject:From:To; b=qCd7UJ7xtchRHsV/AGnzcHsRGNBTZ6V757Gj2n9jK3cqtoPxX3cQFFLmtI9ngKr8w amS75oSZlCWLSoC8bgiZZUoomMZnSbJzwimrBOP5Dt3n/Eiq3shwyVvqlLoF4Dwmm0 rP77ra5yet9yN+aCtHxHwslIE+KdP5zV0Aqx1TrA= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <67022 <at> debbugs.gnu.org>; 14 Mar 2024 18:23:17 +0100 Content-Type: multipart/alternative; boundary="2CXTWVPKQEHQOSSMDMCSPnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: H--- Date: Thu, 14 Mar 2024 18:23:17 +0100 X-Draft-Variant: reply X-Draft-Parentmailid: b11e3d05edbcc19686330957 X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <9303b573b74e4ad8a1a2538d1a9b7201@HIDDEN> In-Reply-To: <<918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN>> References: <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> X-WP-MailID: e11d1902a9d020b5452fd75b5818684f X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [4cO0] Received-SPF: pass client-ip=193.222.135.140; envelope-from=wrotycz@HIDDEN; helo=mx-out.tlen.pl X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Fri, 15 Mar 2024 01:08:56 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) --2CXTWVPKQEHQOSSMDMCSPnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 = I tried to make that CRC-slice-by-8 happen but, as I miss something, may= be you will get that right. My guess the problem lies in all those negatio= ns of crc (`(return) crc =3D crc ^ 0xffffffff;'). I prepared diff tha= t does that, in more, less simple way. `crc32_8b...()' should be in uti= l.c, and crc32.h should only contain lookup table generated by `sample/make= crc8.c', but until it works correctly it is in the header. Moving it to= corret place is the least of the problem. I put the diff in paste as it&= #39;s bit big to attach to email. ~~~ bash wget -Ogzip-1.13-crc328-2.dif= f paste.ee https://paste.ee/d/mkqTU/0 cd gzip-1.13 patch -p1 ../gzip-1.1= 3-crc328-2.diff ~~~ Hope that will help to make it happen.=0D --2CXTWVPKQEHQOSSMDMCSPnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <div>Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32= <br></div><div><br></div><div><br></div><div>I tried to make that CRC-slice= -by-8 happen but, as I miss something, maybe you will get that right.<br></= div><div>My guess the problem lies in all those negations of crc (`(return)= crc =3D crc ^ 0xffffffff;').<br></div><div><br></div><div>I prepared diff = that does that, in more, less simple way. `crc32_8b...()' should be in util= .c, and crc32.h should only contain lookup table generated by `sample/makec= rc8.c', but until it works correctly it is in the header. Moving it to corr= et place is the least of the problem.<br></div><div><br></div><div>I put th= e diff in paste as it's bit big to attach to email.<br></div><div><br></div= ><div>~~~ bash<br></div><div>wget -Ogzip-1.13-crc328-2.diff <a href=3D"http= s://paste.ee/d/mkqTU/0">https://paste.ee/d/mkqTU/0</a><br></div><div>cd gzi= p-1.13<br></div><div>patch -p1 ../gzip-1.13-crc328-2.diff<br></div><div>~~~= <br></div><div><br></div><div>Hope that will help to make it happen.<br></d= iv><div><br></div> --2CXTWVPKQEHQOSSMDMCSPnhgwp--
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Fri, 15 Mar 2024 05:10:03 +0000 Resent-Message-ID: <handler.67022.B67022.17104793417149 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: 67022 <at> debbugs.gnu.org X-Debbugs-Original-To: 67022 <at> debbugs.gnu.org <67022 <at> debbugs.gnu.org>, bug-gzip <bug-gzip@HIDDEN> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.17104793417149 (code B ref 67022); Fri, 15 Mar 2024 05:10:03 +0000 Received: (at 67022) by debbugs.gnu.org; 15 Mar 2024 05:09:01 +0000 Received: from localhost ([127.0.0.1]:51091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkzoQ-0001r5-99 for submit <at> debbugs.gnu.org; Fri, 15 Mar 2024 01:09:01 -0400 Received: from mx-out.tlen.pl ([193.222.135.140]:18383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rkooE-0001Ho-3F for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 13:24:04 -0400 Received: (wp-smtpd smtp.tlen.pl 44185 invoked from network); 14 Mar 2024 18:23:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710436997; bh=qO4Ii/oLGeHZFEzp2nDTpy0qyWGwpwFgPMR+aNfGGtk=; h=Subject:From:To; b=qCd7UJ7xtchRHsV/AGnzcHsRGNBTZ6V757Gj2n9jK3cqtoPxX3cQFFLmtI9ngKr8w amS75oSZlCWLSoC8bgiZZUoomMZnSbJzwimrBOP5Dt3n/Eiq3shwyVvqlLoF4Dwmm0 rP77ra5yet9yN+aCtHxHwslIE+KdP5zV0Aqx1TrA= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <67022 <at> debbugs.gnu.org>; 14 Mar 2024 18:23:17 +0100 Content-Type: multipart/alternative; boundary="2CXTWVPKQEHQOSSMDMCSPnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: H--- Date: Thu, 14 Mar 2024 18:23:17 +0100 X-Draft-Variant: reply X-Draft-Parentmailid: b11e3d05edbcc19686330957 X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <9303b573b74e4ad8a1a2538d1a9b7201@HIDDEN> In-Reply-To: <<918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN>> References: <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> X-WP-MailID: e11d1902a9d020b5452fd75b5818684f X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [4cO0] X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Fri, 15 Mar 2024 01:08:56 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --2CXTWVPKQEHQOSSMDMCSPnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 = I tried to make that CRC-slice-by-8 happen but, as I miss something, may= be you will get that right. My guess the problem lies in all those negatio= ns of crc (`(return) crc =3D crc ^ 0xffffffff;'). I prepared diff tha= t does that, in more, less simple way. `crc32_8b...()' should be in uti= l.c, and crc32.h should only contain lookup table generated by `sample/make= crc8.c', but until it works correctly it is in the header. Moving it to= corret place is the least of the problem. I put the diff in paste as it&= #39;s bit big to attach to email. ~~~ bash wget -Ogzip-1.13-crc328-2.dif= f paste.ee https://paste.ee/d/mkqTU/0 cd gzip-1.13 patch -p1 ../gzip-1.1= 3-crc328-2.diff ~~~ Hope that will help to make it happen.=0D --2CXTWVPKQEHQOSSMDMCSPnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <div>Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32= <br></div><div><br></div><div><br></div><div>I tried to make that CRC-slice= -by-8 happen but, as I miss something, maybe you will get that right.<br></= div><div>My guess the problem lies in all those negations of crc (`(return)= crc =3D crc ^ 0xffffffff;').<br></div><div><br></div><div>I prepared diff = that does that, in more, less simple way. `crc32_8b...()' should be in util= .c, and crc32.h should only contain lookup table generated by `sample/makec= rc8.c', but until it works correctly it is in the header. Moving it to corr= et place is the least of the problem.<br></div><div><br></div><div>I put th= e diff in paste as it's bit big to attach to email.<br></div><div><br></div= ><div>~~~ bash<br></div><div>wget -Ogzip-1.13-crc328-2.diff <a href=3D"http= s://paste.ee/d/mkqTU/0">https://paste.ee/d/mkqTU/0</a><br></div><div>cd gzi= p-1.13<br></div><div>patch -p1 ../gzip-1.13-crc328-2.diff<br></div><div>~~~= <br></div><div><br></div><div>Hope that will help to make it happen.<br></d= iv><div><br></div> --2CXTWVPKQEHQOSSMDMCSPnhgwp--
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Fri, 15 Mar 2024 05:10:04 +0000 Resent-Message-ID: <handler.67022.B67022.17104793467187 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: Adler, Mark <madler@HIDDEN> Cc: 67022 <at> debbugs.gnu.org <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.17104793467187 (code B ref 67022); Fri, 15 Mar 2024 05:10:04 +0000 Received: (at 67022) by debbugs.gnu.org; 15 Mar 2024 05:09:06 +0000 Received: from localhost ([127.0.0.1]:51095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkzoW-0001rd-7Q for submit <at> debbugs.gnu.org; Fri, 15 Mar 2024 01:09:06 -0400 Received: from mx-out.tlen.pl ([193.222.135.145]:30412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rkqGd-0000v9-E7 for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:57:28 -0400 Received: (wp-smtpd smtp.tlen.pl 3764 invoked from network); 14 Mar 2024 19:56:41 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710442601; bh=x6Ct3mHvYqoBKKm+FOMuruhBQfQZlNw0bFZJwyhPxfU=; h=Subject:From:To:Cc; b=h5rgvzpd70F5359mFoDO/dXHxYTh5NcNySNuRLzG937rvEkWCFGyDJWqZHNlJFIRR O6Syl31idqNMbY1RyqWvwm3aRTHggu6S3vwJiWHKlvREz6e+Bi5syu0dGZCGpzf79Z 7uQLrUEANYcd+IOdQFiy+Cr7lo6VmKb5cXEwwddw= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <madler@HIDDEN>; 14 Mar 2024 19:56:41 +0100 Content-Type: multipart/alternative; boundary="2BFWQBUCGESKIQYBNAWYWnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: H--- Date: Thu, 14 Mar 2024 19:56:41 +0100 X-Draft-Variant: reply X-Draft-Parentmailid: a943c9349593e945934e4950 X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> In-Reply-To: <<CA1A2A8F-D1B5-4138-B286-0437FE2F0166@HIDDEN>> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> <CA1A2A8F-D1B5-4138-B286-0437FE2F0166@HIDDEN> X-WP-MailID: 14126c8d6f2d4873be8af864896b0de9 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [ceOE] X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Fri, 15 Mar 2024 01:08:56 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --2BFWQBUCGESKIQYBNAWYWnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 > Mr. Wrotycz, Mr Adler, let's spare the formalities. That's a= nickname. > > On Mar 13, 2024, at 6:14=E2=80=AFPM, wrotycz < wr= otycz@#$%... I know it's a mail list but I would appreciate to not br= oadcast my email to every (spam)bot on the web. Archive is publicly availab= le and easily searchable by boys, so next time don't quote someone'= s email in the message. > I=E2=80=99m not sure what you mean by =E2=80= =9Cbloated=E2=80=9D I mean 600[kB] of crc32.h. I know, there is a lot of = conditionals (compilation)=C2=A0 that make it much smaller in=C2=A0 resulti= ng object, but the sheer size of it makes me nausea. I guess, there is only= one person that can understand flow of conditional directives in it. And c= rc32_z() is even more complicated in this regard. To illustrate the diffe= rence between code of zlib and, what I consider comprehensible, compare cod= e of xxhash and xxhash-clean. I hope you understand. > for CRC-32 does= not use slice-by-8. It uses braids I noticed the lookup table is 'up= side down' but didn't know that thing. And, again, due to level of= complexity in the code, I didn't check it. I have this quirk that I wa= nt to understand stuff I use, here I couldn't so I didn't follow. = I will check that braids thing when I find something about it. Regards= =0D --2BFWQBUCGESKIQYBNAWYWnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <div>> Mr. Wrotycz,<br></div><div><br></div><div>Mr Adler, let's spare t= he formalities. That's a nickname.<br></div><div><br></div><div>> > O= n Mar 13, 2024, at 6:14=E2=80=AFPM, wrotycz < wrotycz@#$%...<br></div><d= iv><br></div><div>I know it's a mail list but I would appreciate to not bro= adcast my email to every (spam)bot on the web. Archive is publicly availabl= e and easily searchable by boys, so next time don't quote someone's email i= n the message.<br></div><div><br></div><div>> I=E2=80=99m not sure what = you mean by =E2=80=9Cbloated=E2=80=9D<br></div><div><br></div><div>I mean 6= 00[kB] of crc32.h. I know, there is a lot of conditionals (compilation)&nbs= p; that make it much smaller in resulting object, but the sheer size = of it makes me nausea. I guess, there is only one person that can understan= d flow of conditional directives in it. And crc32_z() is even more complica= ted in this regard.<br></div><div><br></div><div><div>To illustrate the dif= ference between code of zlib and, what I consider comprehensible, compare c= ode of xxhash and xxhash-clean.<br></div><div>I hope you understand.</div><= /div><div><br></div><div>> for CRC-32 does not use slice-by-8. It uses b= raids<br></div><div><br></div><div>I noticed the lookup table is 'upside do= wn' but didn't know that thing.<br></div><div>And, again, due to level of c= omplexity in the code, I didn't check it. I have this quirk that I want to = understand stuff I use, here I couldn't so I didn't follow.<br></div><div><= br></div><div>I will check that braids thing when I find something about it= .<br></div><div><br></div><div>Regards<br></div> --2BFWQBUCGESKIQYBNAWYWnhgwp--
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Fri, 15 Mar 2024 05:10:04 +0000 Resent-Message-ID: <handler.67022.B67022.17104793497205 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: Adler, Mark <madler@HIDDEN> Cc: 67022 <at> debbugs.gnu.org <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.17104793497205 (code B ref 67022); Fri, 15 Mar 2024 05:10:04 +0000 Received: (at 67022) by debbugs.gnu.org; 15 Mar 2024 05:09:09 +0000 Received: from localhost ([127.0.0.1]:51099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkzoZ-0001s1-29 for submit <at> debbugs.gnu.org; Fri, 15 Mar 2024 01:09:08 -0400 Received: from mx-out.tlen.pl ([193.222.135.158]:57483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rktqj-0007XU-Sd for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 18:46:59 -0400 Received: (wp-smtpd smtp.tlen.pl 2764 invoked from network); 14 Mar 2024 23:46:14 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710456374; bh=XPpGgaWfQTw6G/Q9c1BoF46lETw4N1hOi+6qRh0UPJU=; h=Subject:From:To:Cc; b=sz/N8Z8oBmN/6BY3ie0+ca1/MUUzV625ku0RI66R6xsTT2Yfajdr98mKBcv9H5blm ydtNhmnBwhOnIdEJ82PDKDyoMV1sqcKMd/kgpVHNJK7lGnNv9f0FRRAijQebuGxnmt kH5wGWl1n5wFY1zezvEWZj5reQTvmq9VqQFdASIc= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <madler@HIDDEN>; 14 Mar 2024 23:46:14 +0100 Content-Type: multipart/alternative; boundary="2LACWDOYPYTFNECAIWGWYnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: H--- Date: Thu, 14 Mar 2024 23:46:14 +0100 X-Draft-Variant: reply X-Draft-Parentmailid: bbb677e90fe724c5aa00fdc7 X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <0cfccaaa801144719979ae046caff129@HIDDEN> In-Reply-To: <<C4431D22-729E-495C-B10A-FBE8E93DE747@HIDDEN>> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> <ca1a2a8f-d1b5-4138-b286-0437fe2f0166@HIDDEN> <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> <C4431D22-729E-495C-B10A-FBE8E93DE747@HIDDEN> X-WP-MailID: 8d6896fd08faa5c2d5b3b9fa4e9400fe X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [YUN0] X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Fri, 15 Mar 2024 01:08:56 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --2LACWDOYPYTFNECAIWGWYnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 > The paper on braided CRCs is in the zlib distribution: doc/crc-doc.1.0= .pdf Thanks for a tip, I read that and now it's bit clearer to me. = Maybe it is slightly faster, but I wouldn't bet dollars against nuts i= t's exact in my case as 7zip-crc also uses slice-by-8 algorithm and is = actually faster. Despite that the question is how do I use zlib crc32()? I= t doesn't give me correct result. My 'rig' is this: ~~~ cr= c =3D -1 while (buffer, length =3D read_data()): =C2=A0=C2=A0=C2=A0 { = =C2=A0=C2=A0=C2=A0 crc =3D crcfunc(crc, buffer, length) =C2=A0=C2=A0=C2=A0= } crc =3D ~crc ~~~ This doesn't work with `crc32_z();'=0D --2LACWDOYPYTFNECAIWGWYnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <div>> The paper on braided CRCs is in the zlib distribution: doc/crc-do= c.1.0.pdf<br></div><div><br></div><div>Thanks for a tip, I read that and no= w it's bit clearer to me.<br></div><div><br></div><div><br></div><div>Maybe= it is slightly faster, but I wouldn't bet dollars against nuts it's exact = in my case as 7zip-crc also uses slice-by-8 algorithm and is actually faste= r.<br></div><div>Despite that the question is how do I use zlib crc32()? It= doesn't give me correct result.<br></div><div><br></div><div>My 'rig' is t= his:<br></div><div><br></div><div>~~~<br></div><div>crc =3D -1<br></div><di= v>while (buffer, length =3D read_data()):<br></div><div> = {<br></div><div> crc =3D crcfunc(crc, buffer, length)<br>= </div><div> }<br></div><div>crc =3D ~crc<br></div><div>~~= ~<br></div><div><br></div><div>This doesn't work with `crc32_z();'<br></div= ><div><br></div> --2LACWDOYPYTFNECAIWGWYnhgwp--
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Fri, 15 Mar 2024 05:10:04 +0000 Resent-Message-ID: <handler.67022.B67022.17104793497212 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: Adler, Mark <madler@HIDDEN> Cc: 67022 <at> debbugs.gnu.org <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.17104793497212 (code B ref 67022); Fri, 15 Mar 2024 05:10:04 +0000 Received: (at 67022) by debbugs.gnu.org; 15 Mar 2024 05:09:09 +0000 Received: from localhost ([127.0.0.1]:51101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkzoa-0001sA-Qr for submit <at> debbugs.gnu.org; Fri, 15 Mar 2024 01:09:09 -0400 Received: from mx-out.tlen.pl ([193.222.135.158]:42387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rkuTg-0000F2-By for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 19:27:13 -0400 Received: (wp-smtpd smtp.tlen.pl 6918 invoked from network); 15 Mar 2024 00:26:28 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710458788; bh=xr17pQb7cf75z5/45OYuf24d3ou3HCzKaHJaQ/F3TTo=; h=Subject:From:To:Cc; b=o4VKRKkSLKiUb7CkmPnDzwuYSlNw1rXLVSR5TNmEXA+fH6WXJPj6EameWWSCk8G6J TcuewrAXyELjlm6RKiJKs6EWrD4lBXxs0aRHCoO2OkJmYG3g7NWgf0uzOkD8r7tr5J npQHdKFnCdwUVwI6bY+leSPwjBmNb6dlcy3yGRKo= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <madler@HIDDEN>; 15 Mar 2024 00:26:28 +0100 Content-Type: multipart/alternative; boundary="2IHERQNYTMXACBASKFYMGnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: H--- Date: Fri, 15 Mar 2024 00:26:28 +0100 X-Draft-Variant: reply X-Draft-Parentmailid: 16b646e7fd4d1281b0cadc4b X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <68e1f160cf1e4cc19beb611eda05fb75@HIDDEN> In-Reply-To: <<C3FD6E67-332C-449E-93B7-699F8303FF61@HIDDEN>> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> <ca1a2a8f-d1b5-4138-b286-0437fe2f0166@HIDDEN> <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> <c4431d22-729e-495c-b10a-fbe8e93de747@HIDDEN> <0cfccaaa801144719979ae046caff129@HIDDEN> <C3FD6E67-332C-449E-93B7-699F8303FF61@HIDDEN> X-WP-MailID: d9cec95eb0ebecf89f750020fd92188c X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [IaPk] X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Fri, 15 Mar 2024 01:08:56 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --2IHERQNYTMXACBASKFYMGnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 > The initial value returned by crc32(0L, Z_NULL, 0) is 0, not -1. And t= here is no post inversion That was it, thanks.=0D --2IHERQNYTMXACBASKFYMGnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 > The initial value returned by crc32(0L, Z_NULL, 0) is 0, not -1. And t= here is no post inversion<br><div><br></div><div>That was it, thanks.<br></= div> --2IHERQNYTMXACBASKFYMGnhgwp--
X-Loop: help-debbugs@HIDDEN Subject: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 Resent-From: wrotycz <wrotycz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gzip@HIDDEN Resent-Date: Sat, 16 Mar 2024 13:33:02 +0000 Resent-Message-ID: <handler.67022.B67022.1710595946483 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67022 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: To: Adler <at> debbugs.gnu.org <Adler <at> debbugs.gnu.org>, Mark <madler@HIDDEN> Cc: 67022 <at> debbugs.gnu.org <67022 <at> debbugs.gnu.org> Received: via spool by 67022-submit <at> debbugs.gnu.org id=B67022.1710595946483 (code B ref 67022); Sat, 16 Mar 2024 13:33:02 +0000 Received: (at 67022) by debbugs.gnu.org; 16 Mar 2024 13:32:26 +0000 Received: from localhost ([127.0.0.1]:55135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rlU9C-00007j-Fl for submit <at> debbugs.gnu.org; Sat, 16 Mar 2024 09:32:26 -0400 Received: from mx-out.tlen.pl ([193.222.135.145]:27826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wrotycz@HIDDEN>) id 1rlU9A-00007R-AW for 67022 <at> debbugs.gnu.org; Sat, 16 Mar 2024 09:32:25 -0400 Received: (wp-smtpd smtp.tlen.pl 45736 invoked from network); 16 Mar 2024 14:31:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a; t=1710595899; bh=3mPDoGZyuBqVhNGcWzgyx4sq5yo00O0zV3+NAPu9j1w=; h=Subject:From:To:Cc; b=mtNDNehouyZwgmBaEeEmkAadmZiTHiKILqNgWT6MqRpp8dMKZ/aok8LtQrfZpXy/n oBfzVrlH5tY7i1EwW+EBWjSPpegZfZiDL+hO3yN7btmiajXyg57oRWr5wOoj6G8EaP y8dVvPRCd5Rzc3C4MwuGJNsHWDNZNnVOycX/g6bA= Received: from localhost.localdomain (HELO localhost) ([5.184.234.228]) (envelope-sender <wrotycz@HIDDEN>) by smtp.tlen.pl (WP-SMTPD) with SMTP for <Adler <at> debbugs.gnu.org>; 16 Mar 2024 14:31:39 +0100 Content-Type: multipart/alternative; boundary="2JOBDJRPLFXSFEMKADXWWnhgwp" MIME-Version: 1.0 User-Agent: GWP-Draft X-FactoryStamp: H--- Date: Sat, 16 Mar 2024 14:31:39 +0100 X-Draft-Variant: reply X-Draft-Parentmailid: b3f9dbc1859dbd2c283b519d X-Draft-Contenttype: text/html Priority: normal From: wrotycz <wrotycz@HIDDEN> Message-ID: <2eb495aaf730476ea79a9eb978fc6a57@HIDDEN> In-Reply-To: <<68e1f160cf1e4cc19beb611eda05fb75@HIDDEN>> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN> <ca1a2a8f-d1b5-4138-b286-0437fe2f0166@HIDDEN> <c44c7f11f2e5476f8e83cbdb0034aac2@HIDDEN> <c4431d22-729e-495c-b10a-fbe8e93de747@HIDDEN> <0cfccaaa801144719979ae046caff129@HIDDEN> <c3fd6e67-332c-449e-93b7-699f8303ff61@HIDDEN> <68e1f160cf1e4cc19beb611eda05fb75@HIDDEN> X-WP-MailID: 880c116cca73a3df44940bbfce32696c X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000010 [oXP0] X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --2JOBDJRPLFXSFEMKADXWWnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 > current code in zlib for CRC-32 does not use slice-by-8. It uses braid= s, which is faster. It turns out not to be that fancy in gzip's harn= ess. It seems to be tiny bit faster than slice-by-8 during decompression b= ut slower during compression; to the point of being on par with current Sar= wate algorithm, or tiny bit faster ( paste.ee paste.ee/p/QeBKL ). Bene= fits are not that unambiguous. Though I didn't make that slicing-by-8 (= paste.ee paste.ee/d/mkqTU/0 ) work with gzip properly, I would consider = it in a context of application itself. If braids are faster with decompress= ion, not much though, and slower with compression, then it would make sense= to weight it somehow in this context and asses fitness for this particular= application. Either way, whichever algorithm would be chosen it still w= ould make sense to generate crc table dynamically, when program starts. It = takes, on my turtle computer, less than 10 us. Even rolled version. Unrolle= d isn't much faster either (10%-20%). Using already generated 'Sar= wate's' table=C2=A0 as a basis, halves that time. That's imper= ceptible differences. None is going to notice that, even with atomic clock.= =0D --2JOBDJRPLFXSFEMKADXWWnhgwp Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <div><br></div><div class=3D"nh_extra"><p>> current code in zlib for CRC= -32 does not use slice-by-8. It uses braids, which is faster.<br></p><div><= br></div><div><br></div></div><div>It turns out not to be that fancy in gzi= p's harness.<br></div><div>It seems to be tiny bit faster than slice-by-8 d= uring decompression but slower during compression; to the point of being on= par with current Sarwate algorithm, or tiny bit faster ( <a href=3D"http:/= /paste.ee/p/QeBKL">paste.ee/p/QeBKL</a> ).<br></div><div><br></div><div><br= ></div><div>Benefits are not that unambiguous. Though I didn't make that sl= icing-by-8 ( <a href=3D"http://paste.ee/d/mkqTU/0">paste.ee/d/mkqTU/0</a> )= work with gzip properly, I would consider it in a context of application i= tself. If braids are faster with decompression, not much though, and slower= with compression, then it would make sense to weight it somehow in this co= ntext and asses fitness for this particular application.<br></div><div><br>= </div><div><br></div><div>Either way, whichever algorithm would be chosen i= t still would make sense to generate crc table dynamically, when program st= arts. It takes, on my turtle computer, less than 10 us. Even rolled version= . Unrolled isn't much faster either (10%-20%).<br></div><div>Using already = generated 'Sarwate's' table as a basis, halves that time.<br></div><d= iv>That's imperceptible differences. None is going to notice that, even wit= h atomic clock.<br></div><div><br></div> --2JOBDJRPLFXSFEMKADXWWnhgwp--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Paul Eggert <eggert@HIDDEN> Subject: bug#67022: closed (Gzip decompression can be 60% faster using zlib's CRC32) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.67022.D67022.17392600115626.ackdone <at> debbugs.gnu.org> References: <04c457fc-c804-4da9-b09f-1a45e10e8808@HIDDEN> <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> X-Gnu-PR-Message: closed 67022 X-Gnu-PR-Package: gzip Date: Tue, 11 Feb 2025 07:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1739260022-5650-0" This is a multi-part message in MIME format... ------------=_1739260022-5650-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 10 Feb 2025 23:46:40 -0800 with message-id <04c457fc-c804-4da9-b09f-1a45e10e8808@HIDDEN> and subject line Re: bug#67022: Gzip decompression can be 60% faster using = zlib's CRC32 has caused the debbugs.gnu.org bug report #67022, regarding Gzip decompression can be 60% faster using zlib's CRC32 to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 67022: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67022 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1739260022-5650-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 17:41:17 +0000 Received: from localhost ([127.0.0.1]:48681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r191p-0000lA-EJ for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kym327@HIDDEN>) id 1r191m-0000kw-Km for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1914-0001w5-1L for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:30 -0500 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1912-0004NM-8G for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:29 -0500 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-41cd444d9d0so7507451cf.2 for <bug-gzip@HIDDEN>; Thu, 09 Nov 2023 09:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699551626; x=1700156426; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=; b=jsUlC78mD7oKOF0L44AGwOmEw8caH3ZBlLtk9+fcKbWa94xCnLhxzzrZcbxCF6eTWa QqPEps5BX9wqHC+0qkOrCnqMtVY5W7s9OWU5R0c5b5eeahNc8N6lFbHxygy1WOac2kU3 1sBx75dE1KfR12VLF8WZZ2ZBIsYTnQ46Nu6WipIjyoBRUtxK9wsXhMAyV4e5XFilo1SX Cuo46rlNk3YTDVp8QeK+wFQ0xpZnmGqiGROA4sCupsxr3gy6sQGTbZIaPHW3Ra45I1bb KUhfnu3333GmBFVL0w2C8okwzBBkzCvkiu2MVSuPrQExvDrZE7xX3tXuTkmEdlnSB252 4A7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699551626; x=1700156426; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=; b=wDrw2hn6R0f6+F9w31t+3czeJH5PJ5cTY0ZqzNW71H6dS0KCfR/jTl4vbk5JEAlFfj cN3BLaDXCUN6xnXnXT08WjCYk8HFg90C0VnHFHvfnxSLNl6k59AR3z8Uc8oD1tJXA2fW Nv20/x9C8tz+N+kH7LZUDunsnae/o04k3zDTyumkDaCohYUuwJkoPwwdjPEId1LmuqtK e4iResOTsQpDj68tcequG14wqxGeoB8Eg4VKteSkoQtziSkRNRb4/nfhs5JKlA48Bszh ehNGRCUepNMj+EeXmUw+yyvh3ACt+dMdFl7mSghggjwiwJAgH1HXOb5aUlED1YiTX6NI 5uFw== X-Gm-Message-State: AOJu0YxZgzfpkNw9GTTusgX1C+AiJ0YsX6fl/i/f2AVjuT8hAJtH4vzM UmWy/xUUgROhQT1AhfobDYJ5PSzn+A== X-Google-Smtp-Source: AGHT+IFdH5rL1itK2Bjkj4kTnzeLECoO09hfqUiw9rtz+txGQfcdCqdq3U25fV2tI5gJF20Ot0hvGw== X-Received: by 2002:a05:622a:130c:b0:419:5b97:2fbb with SMTP id v12-20020a05622a130c00b004195b972fbbmr6106355qtk.34.1699551626359; Thu, 09 Nov 2023 09:40:26 -0800 (PST) Received: from ?IPV6:2603:7000:3400:d5b2:1b9e:c639:2739:6a32? (2603-7000-3400-d5b2-1b9e-c639-2739-6a32.res6.spectrum.com. [2603:7000:3400:d5b2:1b9e:c639:2739:6a32]) by smtp.gmail.com with ESMTPSA id f10-20020ac8134a000000b004108d49f391sm2114381qtj.48.2023.11.09.09.40.25 for <bug-gzip@HIDDEN> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Nov 2023 09:40:25 -0800 (PST) Message-ID: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> Date: Thu, 9 Nov 2023 12:40:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-gzip@HIDDEN From: Young Mo Kang <kym327@HIDDEN> Subject: Gzip decompression can be 60% faster using zlib's CRC32 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=kym327@HIDDEN; helo=mail-qt1-x836.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck in decompression, and it can run significantly faster >60% if we replace it with crc32 function from zlib. I tested decompression speed of linux source code tar.gz file before and after replacing CRC32 computation. On an AMD 7735HS system, I get Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kym327[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (kym327[at]gmail.com) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.2 (/) Hello, I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck in decompression, and it can run significantly faster >60% if we replace it with crc32 function from zlib. I tested decompression speed of linux source code tar.gz file before and after replacing CRC32 computation. On an AMD 7735HS system, I get GNU Gzip unmodified Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.11 GNU Gzip with CRC32 from zlib Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.16 And I saw even better performance improvement when tested on an Apple Silicon M1 system. GNU Gzip unmodified Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.83 GNU Gzip with CRC32 from zlib Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.72 Since both GNU Gzip and zlib are written by the same authors, I was wondering if GNU Gzip can share zlib's CRC32 calculation and obtain this performance gain--I am not sure if there would be a license issue though. The following bash script should reproduce the result ``` # download GNU Gzip and zlib wget -O- https://ftp.gnu.org/gnu/gzip/gzip-1.13.tar.gz | tar xzf - wget -O- https://zlib.net/zlib-1.3.tar.gz | tar xzf - # download linux source code as a test file for decompression speed wget -O- https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.1.tar.xz | xz -d | gzip > linux.tar.gz # compile zlib cd zlib-1.3 CFLAGS="-O2 -g" ./configure --static && make -j cd .. # compile GNU Gzip cd gzip-1.13 CFLAGS="-O2 -g" ./configure && make -j # measure decompression speed /usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip1.time # use crc32 from zlib cat > util.diff << EOF @@ -27,6 +27,7 @@ #include <stdlib.h> #include <errno.h> +#include "crc32.h" #include "tailor.h" #include "gzip.h" #include <dirname.h> @@ -136,25 +137,14 @@ copy (int in, int out) ulg updcrc (uch const *s, unsigned n) { - register ulg c; /* temporary variable */ - - if (s == NULL) { - c = 0xffffffffL; - } else { - c = crc; - if (n) do { - c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8); - } while (--n); - } - crc = c; - return c ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ + crc = crc32(crc, s, n); } /* Return a current CRC value. */ ulg getcrc () { - return crc ^ 0xffffffffL; + return crc; } #ifdef IBM_Z_DFLTCC EOF patch < util.diff util.c # create header file cat > crc32.h << EOF #pragma once unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len); EOF # copy crc32 object file from zlib cp ../zlib-1.3/crc32.o . # re-compile GNU Gzip gcc -O2 -g -c util.c -Ilib gcc -O2 -g *.o lib/libgzip.a -o gzip # measure decompression speed /usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip2.time # print out time difference cd .. echo echo "GNU Gzip unmodified" grep Elapsed gzip1.time echo "GNU Gzip with CRC32 from zlib" grep Elapsed gzip2.time ``` ------------=_1739260022-5650-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67022-done) by debbugs.gnu.org; 11 Feb 2025 07:46:51 +0000 Received: from localhost ([127.0.0.1]:54168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1thkyp-0001Sg-Eh for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 02:46:51 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:43052) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1thkyn-0001SP-34 for 67022-done <at> debbugs.gnu.org; Tue, 11 Feb 2025 02:46:50 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B83EF3C011BE0; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id oHg-i1KeWXBS; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 5F3743C00FA94; Mon, 10 Feb 2025 23:46:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 5F3743C00FA94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739260002; bh=Vd9Yt4hn4ygYoluI5/iunkcGmufJTru5GTj/JnUNPwQ=; h=Message-ID:Date:MIME-Version:From:To; b=e3l/q6Nx9buL1NBW2fk711uXuj/LGOqPPPZF++GYhZqqdaO9hJ9yf/8WqB+9lferb zrbBHSw/9ZbNyHQ6Tln8VZGcdxxKa1zrYFOLSsjmcvT8/97Pmx3nkcqZuVArZCvoGw SG9k4zFh/sJFyf14TMa9uAp+w1Vq04A3V+IVC/MeiqCKt+LIhGLSikDYMFhGD0uzVp opZIVRr1Fe7HpHa1bZ2/7WxB3Sc26KPA6Xu2QB3PHpzXsG8GorTUQXVW67gm4QANJ2 4s6fBvU/hCaxYm6GAhZcrk3d6yyhXYGctkZWGfh7mSzllpb2Lxf8w7EUKT/PmLWgSl It4fCeeYUqJ7w== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id ARIu3oYuEnhh; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Received: from [192.168.254.12] (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 452BE3C011BE0; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Message-ID: <04c457fc-c804-4da9-b09f-1a45e10e8808@HIDDEN> Date: Mon, 10 Feb 2025 23:46:40 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 From: Paul Eggert <eggert@HIDDEN> To: Young Mo Kang <kym327@HIDDEN> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <e703aea9-aa26-4b03-a20f-5d7b32ab3d44@HIDDEN> Content-Language: en-US Organization: UCLA Computer Science Department In-Reply-To: <e703aea9-aa26-4b03-a20f-5d7b32ab3d44@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 67022-done Cc: 67022-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 2023-11-09 10:32, Paul Eggert wrote: > On 2023-11-09 09:40, Young Mo Kang wrote: >> Since both GNU Gzip and zlib are written by the same authors, I was >> wondering if GNU Gzip can share zlib's CRC32 calculation and obtain >> this performance gain--I am not sure if there would be a license issue >> though. > > Shouldn't be a license issue. It's just a lack of time issue. Due to work by Sam Russell and others it looks like gzip now has faster CRC32 code on Savannah master, so closing this old bug report. See: https://bugs.gnu.org/74927 https://bugs.gnu.org/74192 ------------=_1739260022-5650-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Young Mo Kang <kym327@HIDDEN> Subject: bug#67022: closed (Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32) Message-ID: <handler.67022.D67022.17392600115626.notifdone <at> debbugs.gnu.org> References: <04c457fc-c804-4da9-b09f-1a45e10e8808@HIDDEN> <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> X-Gnu-PR-Message: they-closed 67022 X-Gnu-PR-Package: gzip Reply-To: 67022 <at> debbugs.gnu.org Date: Tue, 11 Feb 2025 07:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1739260022-5650-1" This is a multi-part message in MIME format... ------------=_1739260022-5650-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67022: Gzip decompression can be 60% faster using zlib's CRC32 which was filed against the gzip package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67022 <at> debbugs.gnu.org. --=20 67022: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67022 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1739260022-5650-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67022-done) by debbugs.gnu.org; 11 Feb 2025 07:46:51 +0000 Received: from localhost ([127.0.0.1]:54168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1thkyp-0001Sg-Eh for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 02:46:51 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:43052) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1thkyn-0001SP-34 for 67022-done <at> debbugs.gnu.org; Tue, 11 Feb 2025 02:46:50 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B83EF3C011BE0; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id oHg-i1KeWXBS; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 5F3743C00FA94; Mon, 10 Feb 2025 23:46:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 5F3743C00FA94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739260002; bh=Vd9Yt4hn4ygYoluI5/iunkcGmufJTru5GTj/JnUNPwQ=; h=Message-ID:Date:MIME-Version:From:To; b=e3l/q6Nx9buL1NBW2fk711uXuj/LGOqPPPZF++GYhZqqdaO9hJ9yf/8WqB+9lferb zrbBHSw/9ZbNyHQ6Tln8VZGcdxxKa1zrYFOLSsjmcvT8/97Pmx3nkcqZuVArZCvoGw SG9k4zFh/sJFyf14TMa9uAp+w1Vq04A3V+IVC/MeiqCKt+LIhGLSikDYMFhGD0uzVp opZIVRr1Fe7HpHa1bZ2/7WxB3Sc26KPA6Xu2QB3PHpzXsG8GorTUQXVW67gm4QANJ2 4s6fBvU/hCaxYm6GAhZcrk3d6yyhXYGctkZWGfh7mSzllpb2Lxf8w7EUKT/PmLWgSl It4fCeeYUqJ7w== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id ARIu3oYuEnhh; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Received: from [192.168.254.12] (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 452BE3C011BE0; Mon, 10 Feb 2025 23:46:42 -0800 (PST) Message-ID: <04c457fc-c804-4da9-b09f-1a45e10e8808@HIDDEN> Date: Mon, 10 Feb 2025 23:46:40 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32 From: Paul Eggert <eggert@HIDDEN> To: Young Mo Kang <kym327@HIDDEN> References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> <e703aea9-aa26-4b03-a20f-5d7b32ab3d44@HIDDEN> Content-Language: en-US Organization: UCLA Computer Science Department In-Reply-To: <e703aea9-aa26-4b03-a20f-5d7b32ab3d44@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 67022-done Cc: 67022-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 2023-11-09 10:32, Paul Eggert wrote: > On 2023-11-09 09:40, Young Mo Kang wrote: >> Since both GNU Gzip and zlib are written by the same authors, I was >> wondering if GNU Gzip can share zlib's CRC32 calculation and obtain >> this performance gain--I am not sure if there would be a license issue >> though. > > Shouldn't be a license issue. It's just a lack of time issue. Due to work by Sam Russell and others it looks like gzip now has faster CRC32 code on Savannah master, so closing this old bug report. See: https://bugs.gnu.org/74927 https://bugs.gnu.org/74192 ------------=_1739260022-5650-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 17:41:17 +0000 Received: from localhost ([127.0.0.1]:48681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r191p-0000lA-EJ for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kym327@HIDDEN>) id 1r191m-0000kw-Km for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1914-0001w5-1L for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:30 -0500 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1912-0004NM-8G for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:29 -0500 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-41cd444d9d0so7507451cf.2 for <bug-gzip@HIDDEN>; Thu, 09 Nov 2023 09:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699551626; x=1700156426; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=; b=jsUlC78mD7oKOF0L44AGwOmEw8caH3ZBlLtk9+fcKbWa94xCnLhxzzrZcbxCF6eTWa QqPEps5BX9wqHC+0qkOrCnqMtVY5W7s9OWU5R0c5b5eeahNc8N6lFbHxygy1WOac2kU3 1sBx75dE1KfR12VLF8WZZ2ZBIsYTnQ46Nu6WipIjyoBRUtxK9wsXhMAyV4e5XFilo1SX Cuo46rlNk3YTDVp8QeK+wFQ0xpZnmGqiGROA4sCupsxr3gy6sQGTbZIaPHW3Ra45I1bb KUhfnu3333GmBFVL0w2C8okwzBBkzCvkiu2MVSuPrQExvDrZE7xX3tXuTkmEdlnSB252 4A7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699551626; x=1700156426; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=; b=wDrw2hn6R0f6+F9w31t+3czeJH5PJ5cTY0ZqzNW71H6dS0KCfR/jTl4vbk5JEAlFfj cN3BLaDXCUN6xnXnXT08WjCYk8HFg90C0VnHFHvfnxSLNl6k59AR3z8Uc8oD1tJXA2fW Nv20/x9C8tz+N+kH7LZUDunsnae/o04k3zDTyumkDaCohYUuwJkoPwwdjPEId1LmuqtK e4iResOTsQpDj68tcequG14wqxGeoB8Eg4VKteSkoQtziSkRNRb4/nfhs5JKlA48Bszh ehNGRCUepNMj+EeXmUw+yyvh3ACt+dMdFl7mSghggjwiwJAgH1HXOb5aUlED1YiTX6NI 5uFw== X-Gm-Message-State: AOJu0YxZgzfpkNw9GTTusgX1C+AiJ0YsX6fl/i/f2AVjuT8hAJtH4vzM UmWy/xUUgROhQT1AhfobDYJ5PSzn+A== X-Google-Smtp-Source: AGHT+IFdH5rL1itK2Bjkj4kTnzeLECoO09hfqUiw9rtz+txGQfcdCqdq3U25fV2tI5gJF20Ot0hvGw== X-Received: by 2002:a05:622a:130c:b0:419:5b97:2fbb with SMTP id v12-20020a05622a130c00b004195b972fbbmr6106355qtk.34.1699551626359; Thu, 09 Nov 2023 09:40:26 -0800 (PST) Received: from ?IPV6:2603:7000:3400:d5b2:1b9e:c639:2739:6a32? (2603-7000-3400-d5b2-1b9e-c639-2739-6a32.res6.spectrum.com. [2603:7000:3400:d5b2:1b9e:c639:2739:6a32]) by smtp.gmail.com with ESMTPSA id f10-20020ac8134a000000b004108d49f391sm2114381qtj.48.2023.11.09.09.40.25 for <bug-gzip@HIDDEN> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Nov 2023 09:40:25 -0800 (PST) Message-ID: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN> Date: Thu, 9 Nov 2023 12:40:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-gzip@HIDDEN From: Young Mo Kang <kym327@HIDDEN> Subject: Gzip decompression can be 60% faster using zlib's CRC32 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=kym327@HIDDEN; helo=mail-qt1-x836.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck in decompression, and it can run significantly faster >60% if we replace it with crc32 function from zlib. I tested decompression speed of linux source code tar.gz file before and after replacing CRC32 computation. On an AMD 7735HS system, I get Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kym327[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (kym327[at]gmail.com) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.2 (/) Hello, I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck in decompression, and it can run significantly faster >60% if we replace it with crc32 function from zlib. I tested decompression speed of linux source code tar.gz file before and after replacing CRC32 computation. On an AMD 7735HS system, I get GNU Gzip unmodified Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.11 GNU Gzip with CRC32 from zlib Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.16 And I saw even better performance improvement when tested on an Apple Silicon M1 system. GNU Gzip unmodified Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.83 GNU Gzip with CRC32 from zlib Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.72 Since both GNU Gzip and zlib are written by the same authors, I was wondering if GNU Gzip can share zlib's CRC32 calculation and obtain this performance gain--I am not sure if there would be a license issue though. The following bash script should reproduce the result ``` # download GNU Gzip and zlib wget -O- https://ftp.gnu.org/gnu/gzip/gzip-1.13.tar.gz | tar xzf - wget -O- https://zlib.net/zlib-1.3.tar.gz | tar xzf - # download linux source code as a test file for decompression speed wget -O- https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.1.tar.xz | xz -d | gzip > linux.tar.gz # compile zlib cd zlib-1.3 CFLAGS="-O2 -g" ./configure --static && make -j cd .. # compile GNU Gzip cd gzip-1.13 CFLAGS="-O2 -g" ./configure && make -j # measure decompression speed /usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip1.time # use crc32 from zlib cat > util.diff << EOF @@ -27,6 +27,7 @@ #include <stdlib.h> #include <errno.h> +#include "crc32.h" #include "tailor.h" #include "gzip.h" #include <dirname.h> @@ -136,25 +137,14 @@ copy (int in, int out) ulg updcrc (uch const *s, unsigned n) { - register ulg c; /* temporary variable */ - - if (s == NULL) { - c = 0xffffffffL; - } else { - c = crc; - if (n) do { - c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8); - } while (--n); - } - crc = c; - return c ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ + crc = crc32(crc, s, n); } /* Return a current CRC value. */ ulg getcrc () { - return crc ^ 0xffffffffL; + return crc; } #ifdef IBM_Z_DFLTCC EOF patch < util.diff util.c # create header file cat > crc32.h << EOF #pragma once unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len); EOF # copy crc32 object file from zlib cp ../zlib-1.3/crc32.o . # re-compile GNU Gzip gcc -O2 -g -c util.c -Ilib gcc -O2 -g *.o lib/libgzip.a -o gzip # measure decompression speed /usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip2.time # print out time difference cd .. echo echo "GNU Gzip unmodified" grep Elapsed gzip1.time echo "GNU Gzip with CRC32 from zlib" grep Elapsed gzip2.time ``` ------------=_1739260022-5650-1--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.