-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: When using the same compression parameters as 7-zip, the compression process can be 10% - 20% slower. #224
Comments
Hi! I've been doing some benchmarking and profiling with a similar use case and have indeed noticed some bit7z overhead. Having said that, there are a few factors that can increase bit7z's overhead over 7-Zip's compression:
All of these factors can add overhead to your application, but the actual overhead will likely depend on your use case, and in many cases it will be negligible. |
Hi! I have done some extensive benchmarking and profiling. Despite this improvement, bit7z is still slower than 7-Zip, and my hunch that |
Thank you for your reply. Following the v4.0.8 code, I have also achieved an approximate 10% increase in speed. However, it is still somewhat inferior compared to 7zip. I look forward to the improved performance in the future. |
I have just pushed a commit (27abf0c) with the re-implementation of the file streams using low-level IO functions ( Anyway, thanks for all the tests you're performing! 🙏 |
Hi! |
Hi! Actually, I've seen bit7z performing faster (in the tests that produced the graph above, it was 1s faster on average; in other tests, even 10s seconds faster). Also, I've noticed that you are building for x86 instead of x86_64. Are you also testing the x86 version of 7-zip?
Even with the low-level optimizations, the same considerations I reported in my first comment about Also, the low-level implementation I wrote is not actually the lowest level achievable, as it uses Microsoft's implementation of POSIX functions like |
Thank you for your reply! Yes,I am using the x86. I am also using the x86 version of 7-zip. |
It might be due to the thread count settings. After setting the thread count to be the same as 7-zip, the test results here show that it is 2 seconds slower than 7-zip. |
Hi! There's still some overhead, though. I guess this is due to the remaining non-native functions, so I'll need to test a native-only implementation. It'll probably take some time, as benchmarking is quite slow.
Thanks for the further details.
I see.
This is new and quite strange, given that you also removed the callback. Edit: just to be clear, you're not using any callback in the QT program, right? |
I added code in the QT process to prevent DLL injection, which caused the compression time to be longer. After removing it, the compression time is normal. |
Why not pass std::filesystem::path instead of Change like that would of course break all existing code so you'd probably have to create new callbacks and deprecate the old ones (provided that using path actually provides better performance but even if it doesn't I think it would be worth doing). |
Hi, sorry for the late reply to this! Yeah, I am actually dreaming of the day when I finally drop support for C++11 and C++14 in the public API and use C++17/ |
Feature description
For a 10GB folder, using 7zFM.exe for compression takes about 80 seconds, while the test code takes an average of around 90 seconds. The goal is to achieve the same compression speed as 7-zip.
7-zip: 24.05
OS: Win10, MSVC2019, x86.
flags: BIT7Z_AUTO_FORMAT、BIT7Z_REGEX_MATCHING、BIT7Z_AUTO_PREFIX_LONG_PATHS、BIT7Z_PATH_SANITIZATION
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: