2

I made three ZIP files (one with no compression settings, one with minimal compression and one with maximum compression)

I then had my script unzip each one, and timed it. First I did it with ZipArchive, then with exec('unzip')

Every time, it was faster using ZipArchive then exec('unzip')

I thought that surely a native program would be faster than a library? Are there some switches I could use with exec('unzip') (that would make it similar to ZipArchive) to make it as fast?

cantsay
  • 1,967
  • 3
  • 21
  • 34
  • 3
    Probably the process-creation penalty. Starting a new process, such as via exec, is always very slow. Try it with a very large, very complex archive, and the native program should catch up. – elixenide Aug 08 '15 at 03:31

0 Answers0