• jaybone@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago

    How does multithreading improve the performance of an unzip operation? I would think the opposite, given the context switching and (abstracted) low level drive writes.

    • Creat@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      58 minutes ago

      It’s heavily CPU bound in a normal system today. Extracting (let alone compressing) a 2 GB file will take a noticeable amount of time. Reading the whole thing from an nvme will take roughly 1 second. Random access is no longer a relevant performance impact either.

      It is my understanding that multithreaded extraction is hard(er) cause the used dictionary is built up incrementally. So to extract later parts you need to have extracted earlier parts.