Re: Profiling of man-db database generation with zlib vs zstd

2022-03-31 Thread Ludovic Courtès
Hi! I did a similar experiment as you did, but using the GCC tarball (I was too lazy to wait for ungoogled-chromium’s tarball), like so: --8<---cut here---start->8--- $ xz -d < /gnu/store/x043r7crzd0p0p5cfky8r6hwsxknhkk0-gcc-11.2.0.tar.xz | zstd -19 > /tmp/gcc

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-30 Thread Jonathan McHugh
Hi Maxim, Out of interest, will a zstd dictionary be (eventually) utilised as a strategy for further reducing compression and decompression speeds? ``` The compression library Zstandard (also known as "Zstd") has the ability to create an external "dictionary" from a set of training files which

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-30 Thread Maxim Cournoyer
Hi Ludovic, Ludovic Courtès writes: [...] > To isolate the problem, you could allocate the 4 MiB buffer outside of > the loop and use ‘get-bytevector-n!’, and also remove code that writes > to ‘output’. I've adjusted the benchmark like so: --8<---cut here---start--

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-29 Thread Ludovic Courtès
Hi! Maxim Cournoyer skribis: > You'll need to generate the tar.zst and tar.gz yourself, but the script > that was used is: > > ;; decompress-zstd.scm > (use-modules (ice-9 binary-ports) > (ice-9 match) > (statprof) > (zstd)) > > (define MiB (expt 2 20)) > (

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-29 Thread Ludovic Courtès
Howdy, Maxim Cournoyer skribis: > OK, I've now compiled guix/man-db.scm with -O3, generated a profile with > ~5300 manuals (guix shell --no-grafts --pure man-db perl@5.14 man-pages > libx11:doc gnutls-dane:doc my-tcl) on core-updates with my local changes > to compress man pages with zstd and pr

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-27 Thread Maxim Cournoyer
Hi again, Here I decided to look at the raw performance of guile-zstd vs guile-zlib when decompressing the ungoogled-chromium source into a 4 GiB something tarball. You'll need to generate the tar.zst and tar.gz yourself, but the script that was used is: --8<---cut here--

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-26 Thread Maxim Cournoyer
Hello, Maxim Cournoyer writes: > Hi Ludovic! > > Ludovic Courtès writes: > >> Hi, >> >> Maxim Cournoyer skribis: >> >>> scheme@(guix man-db)> ,profile (define a (mandb-entries >>> "/gnu/store/jgc63dxvpd8zq0p8al71x07a02qj8i1b-man-pages-5.13/share/man")) >>> % cumulative self >>> time s

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-25 Thread Maxim Cournoyer
Hi Ludovic! Ludovic Courtès writes: > Hi, > > Maxim Cournoyer skribis: > >> scheme@(guix man-db)> ,profile (define a (mandb-entries >> "/gnu/store/jgc63dxvpd8zq0p8al71x07a02qj8i1b-man-pages-5.13/share/man")) >> % cumulative self >> time seconds seconds procedure >> 2

Re: Profiling of man-db database generation with zlib vs zstd

2022-03-24 Thread Ludovic Courtès
Hi, Maxim Cournoyer skribis: > scheme@(guix man-db)> ,profile (define a (mandb-entries > "/gnu/store/jgc63dxvpd8zq0p8al71x07a02qj8i1b-man-pages-5.13/share/man")) > % cumulative self > time seconds seconds procedure > 20.95 1.98 1.75 gdbm.scm:122:11 > 20.95

Profiling of man-db database generation with zlib vs zstd

2022-03-22 Thread Maxim Cournoyer
Hello Guix, I've spent some time looking whether the manual database generation could be sped up by switching from compressing the manual pages with zstd instead of zlib, which is reported to be about 3.5 times faster to decompress. I thought decompression would play a role because the hook is CP