WallSoGB / Fallout-zlibUpdate

GNU Lesser General Public License v2.1
3 stars 3 forks source link

Possible to migrate to zlib-ng? #1

Open murlakatamenka opened 5 months ago

murlakatamenka commented 5 months ago

zlib-ng is just faster in general and on modern hardware in particular:

https://github.com/zlib-ng/zlib-ng

In my understanding it's a drop-in replacement, i.e. API/ABI compatible with zlib

Some projects move or consider moving to it:

soqb commented 4 months ago

can confirm i just switched my (wip) fallout record parser to zlib-ng (from miniz_oxide) and it made parsing in general 8x faster (zlib decompression became 10x or something AFAIR).

never tried with traditional zlib but i imagine ng is still much faster.

withthelemons commented 4 months ago

Here's build with zlib-ng (develop branch, 80c541) I've only tested it on my machine and have no way to benchmark it, but it works and feels faster. I will appreciate it if you give it a try. The repository needs cleaning up, I just compiled zlib-ng locally and copied the binaries. We can merge it if @WallSoGB wants.

https://github.com/withthelemons/Fallout-zlibUpdate

WallSoGB commented 4 months ago

Hi, thanks for the suggestion and the fork.

Gave it a try, and somehow ng manages to be overall slower by 200ms (testing same as the original mod, that is time from NVSEMessagingInterface::kMessage_PreLoadGame to NVSEMessagingInterface::kMessage_PostLoadGame).

withthelemons commented 4 months ago

Thank you for trying it out. It's interesting that zlib-ng is slower, but not surprising since it's optimized for x86_64. If it's not too much trouble, could you tell me how to add timestamps logging so I can replicate it? I assume there's xNVSE plugin that adds it.