Skip to content

patch-from in single-thread mode performs worse than multithreaded #4093

@RubenKelevra

Description

@RubenKelevra

Describe the bug
The man page states:

Note: for all levels, you can use --patch-from in --single-thread mode to improve compression ratio at the cost of speed.

I tried that. This is not true.

To Reproduce
Steps to reproduce the behavior:

  1. use --patch-from with -T8
  2. use --patch-from with --single-thread
  3. see --single-thread perform worse

Expected behavior
--single-thread should not perform worse.

Screenshots and charts

❯ zstd --long -T8 --progress --ultra -22 --patch-from archlinux-2024.06.01-x86_64.iso archlinux-2024.07.01-x86_64.iso
archlinux-2024.07.01-x86_64.iso : 25.03%   (  1.09 GiB =>    280 MiB, archlinux-2024.07.01-x86_64.iso.zst) 

5m 53s
❯ zstd --long --single-thread --progress --ultra -22 --patch-from archlinux-2024.06.01-x86_64.iso archlinux-2024.07.01-x86_64.iso 
archlinux-2024.07.01-x86_64.iso : 46.21%   (  1.09 GiB =>    517 MiB, archlinux-2024.07.01-x86_64.iso.zst) 

7m 9s

Desktop (please complete the following information):

  • OS: CachyOS
  • Version 1.5.6
  • Other relevant hardware specs: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions