From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4PRmKFfhRWJYSAEAgWs5BA (envelope-from ) for ; Thu, 31 Mar 2022 19:13:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AFqoIFfhRWLsjAAAG6o9tA (envelope-from ) for ; Thu, 31 Mar 2022 19:13:59 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2A66BF2FF for ; Thu, 31 Mar 2022 19:13:59 +0200 (CEST) Received: from localhost ([::1]:50538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZyMw-0006nf-5z for larch@yhetil.org; Thu, 31 Mar 2022 13:13:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZyMY-0006mZ-FH for guix-devel@gnu.org; Thu, 31 Mar 2022 13:13:34 -0400 Received: from [2001:470:142:3::e] (port=35876 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZyMY-0003yX-6h; Thu, 31 Mar 2022 13:13:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=+1HsFtY4J0RSb6I3XFI8GCSI5DsnfmqEs/5rWAqFYb8=; b=fVKsFEzb4OdD8I3m4s0U z1zr6f3XXaB28RMHsnZr0t5Nmskb1CRvjsorv6hOn1FaZxMj+gHJmunqPmDXfsz6APAsyOE6/DMXJ zV4tbZmjYqAh6CAoNb/JR2sYrOQnNTUw6OjgmQOHqOVQsztoCWXz6NgnGkWQP8vtzqNbsLNGKbHDY YWudg50Y3uNUmQEnW3UitpqVME9dDb8TdjS9ENM3CfHYXd3dzI+WuGXOTMPhdpdtJHkqCRm5tfLtq vk/Ot++rBBiiCuDS0yByCemrn88Pv7Jqcx1xOWLTgng9YoOJQS87YG8Wj+ajCZnslM5/bagfYuUE1 iurL65gsuELQDg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:63686 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZyMX-0005zX-Qc; Thu, 31 Mar 2022 13:13:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: Profiling of man-db database generation with zlib vs zstd References: <875yo53iuq.fsf@gmail.com> <87ee2r9gms.fsf@gnu.org> <87o81qviqg.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 31 Mar 2022 19:13:31 +0200 In-Reply-To: <87o81qviqg.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 27 Mar 2022 23:49:59 -0400") Message-ID: <875ynuqc3o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648746839; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=+1HsFtY4J0RSb6I3XFI8GCSI5DsnfmqEs/5rWAqFYb8=; b=tRqSRafwL7JDVkHgEZb3usi/bBZqzooOmK4hnKscUzr4Vmf8LzSdv6eIk91oMEMB8MbQ3o qIPU5YokFxNZS7Un7lISAji1cCwFvEAdiuv3J8UUDYmfecO1sEpJwASJMcLnSBsLb9cnJx 88BIV2bC5ttS8yvz+ss+DBdqvwQyxth8udNwDB6N+V5q+VgTCyRGrXCWp9or59qakJZR9f tJKhejKAPDn/3QJi7+9j/IW9idWzg2DtyZGZjG0LtwU3lSfybRJZQKDweXSGXVQzQDx/9n bzR7k/UvJ4Q9c5ZtEQMBx54pBT45tLjeR9LzVrqQz/HNNwAXoRY+LznhypcfYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648746839; a=rsa-sha256; cv=none; b=PpzC0KjtfQF445un/BKPlkNhAXEBKrfpldB5+kQq2wJOZJbytMmD8xNplsufL8MH/vYv/u VzGNl8qWpIwcBL8iO5RMuWdUnYyU0UbKZuNJ9UNfxUasck/vIR3nNP0gpAlTcXp85eR3CC ndU9hc3HjyEJWJ8H1gjwkJ2J0QhFXqmW8iJFCbCIdlmXWFOCQMpMWwMMFeTOvsVZ0e0+yI lfHFLrdH5Ew/9i+bOe+CB2x/ru8AtqUPU8irpwhogDaX0way8+pHatvmNvyka69bmTC946 bexX6PDoj1dbWlAjlINeJAQkrEFCjEYhECBfH8PrK/z7P88LZARJxha9I2Z5LQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=fVKsFEzb; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.07 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=fVKsFEzb; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2A66BF2FF X-Spam-Score: -7.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: kQ8A8iCgqAZp Hi! I did a similar experiment as you did, but using the GCC tarball (I was too lazy to wait for ungoogled-chromium=E2=80=99s tarball), like so: --8<---------------cut here---------------start------------->8--- $ xz -d < /gnu/store/x043r7crzd0p0p5cfky8r6hwsxknhkk0-gcc-11.2.0.tar.xz | z= std -19 > /tmp/gcc.zst $ xz -d < /gnu/store/x043r7crzd0p0p5cfky8r6hwsxknhkk0-gcc-11.2.0.tar.xz | g= zip -9 > /tmp/gcc.gz $ du -h /tmp/gcc.{zst,gz} 81M /tmp/gcc.zst 128M /tmp/gcc.gz --8<---------------cut here---------------end--------------->8--- The code (the inner loop is pure decompression, no allocation, no I/O): --8<---------------cut here---------------start------------->8--- (use-modules (zstd) (zlib) (rnrs bytevectors) (ice-9 binary-ports) (ice-9 match) (ice-9 time)) (define bv (make-bytevector (* 4 (expt 2 20)))) (define (dump port) (let loop () (match (get-bytevector-n! port bv 0 (bytevector-length bv)) ((? eof-object?) #t) (n (loop))))) (pk 'zlib) (call-with-gzip-input-port (open-input-file "/tmp/gcc.gz") (lambda (port) (time (dump port)))) (pk 'zst) (call-with-zstd-input-port (open-input-file "/tmp/gcc.zst") (lambda (port) (time (dump port)))) --8<---------------cut here---------------end--------------->8--- The result shows that zstd decompression is ~60% faster than gzip decompression: --8<---------------cut here---------------start------------->8--- $ guile ~/src/guix-debugging/decompress.scm ;;; (zlib) clock utime stime cutime cstime gctime 2.15 2.11 0.03 0.00 0.00 0.00 ;;; (zst) clock utime stime cutime cstime gctime 0.80 0.77 0.03 0.00 0.00 0.00 --8<---------------cut here---------------end--------------->8--- Are you observing something similar? Ludo=E2=80=99.