mirror of
https://github.com/google/brotli.git
synced 2026-09-23 07:05:31 +00:00
Windows decoding performance #146
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eustas on GitHub (Nov 22, 2016).
It seems that windows brotli binary is 1.5x slower than linux one. Even if compiled with mingw gcc 5.4.
I run it under Wine, but I am almost sure this can't be a problem source.
Any ideas, what could cause slowness?
@eustas commented on GitHub (Nov 22, 2016):
Found the problem: it is IO!
If I comment out fwrite, then speed difference is less than 10%. Going to make a serie of pure in-memory tests and report back.
@eustas commented on GitHub (Nov 23, 2016):
Completed some measurements.
Corpora:
wiki- enwik8, compression level 9geo- non human-readable data, compression level 6html- various HTML pages, compression level 11Binaries:
linux-mingw- mingw gcc 4.8.2 under Ubuntuold-linux- gcc 4.8.4linux- gcc 5.2.0win32- MSVC 2015, default Premake5 generated projectwin64- MSVC 2015, same as above, but switched to x64 platformwin-mingw- mingw gcc 5.4.0Baseline is
linux; other lines - percentage of speed, relative tolinuxspeed for the same corpus.Windows binaries are tested under Wine.
wikigeohtmllinux-mingwold-linuxlinuxwin32win64win-mingwConclusions:
htmlcase; perhaps there is something that adds overhead for literal context modeling on Windows (calling convention / register starvation?)Bottom line:
linux-toolsperf; but it doesn't work for binaries under WineIS_CONSTANTmacros for MSVC?@eustas commented on GitHub (Nov 23, 2016):
Disabling all compiler specific tricks doesn't hurt Linux/gcc performance more than 5% -> PREDICT_X / IS_CONSTANT seems to be a wrong trail.
MSVC PGO is simply no-op.
@eustas commented on GitHub (Nov 25, 2016):
Compiled with gcc 6.2.1 and mingw-gcc 6.2.1 with
-fpicand fascall convention for internal functions...Now disassembly looks almost the same (excluding aligning "nop" style and register scheduling)... but windows binary is still slower (under Wine). Pure mystery!
@eustas commented on GitHub (Jun 1, 2017):
Only CLI is hurt by IO; closing this issue, due to the lack of interest. Feel free to reopen it.