Skip to content
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

Windows build is slower than Linux build #3

Open
bvibber opened this issue Sep 30, 2018 · 1 comment
Open

Windows build is slower than Linux build #3

bvibber opened this issue Sep 30, 2018 · 1 comment

Comments

@bvibber
Copy link
Owner

bvibber commented Sep 30, 2018

Win64 and win32 builds of mtpng are noticeably slower than Linux or macOS builds, more so than when running the Linux build on WSL.

It looks like it may be due to using zlib via the libz_sys crate, which compiles locally on Windows while picking up a highly-optimized system package on Linux. The local compile may not pick up the best optimization options, and definitely doesn't engage the specialized assembly functions that are available.

@bvibber
Copy link
Owner Author

bvibber commented Sep 30, 2018

Using the vcpkg version of zlib seems to help a little. To use it, set up vcpkg and add this env var in PowerShell:

$env:VCPKGRS_DYNAMIC = "1"

(note this pulls it in as a .dll)

However that still seems to not be using the assembly optimizations? Manually built the .dll from source and dropped it in and it's closer still:

  • Static version: 671ms
  • vcpkg version: 646ms
  • manually built zlib1.dll: 596ms
  • Ubuntu/WSL version: 555ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant