Page MenuHomeFreeBSD

zstd: fix benchmarking

Authored by mjg on Feb 9 2022, 9:33 PM.
Referenced Files
Unknown Object (File)
Thu, Jan 5, 5:45 PM
Unknown Object (File)
Dec 24 2022, 10:52 AM
Unknown Object (File)
Dec 18 2022, 12:03 PM
Unknown Object (File)
Dec 14 2022, 3:43 AM
Unknown Object (File)
Dec 12 2022, 2:13 AM
Unknown Object (File)
Dec 12 2022, 2:12 AM
Unknown Object (File)
Dec 12 2022, 2:11 AM
Unknown Object (File)
Dec 12 2022, 2:05 AM



buildworld ends up defining the C standard as below C11, in turn zstd decides to use C90 timing primitives which by their own commentary give wrong results in multi-threaded setups.

This fixed speed reporting. See for more details.

I don't care about the patch, feel free to drop it and fix in a different manner.

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Feb 9 2022, 9:33 PM
mjg created this revision.

We should probably also look into importing latest release since 1.5+ provides overall performance improvements.

rew added a subscriber: rew.

not sure if using CSTD=c11 in usr.bin/zstd/Makefile would be acceptable/work here, to avoid touching contrib code.

otherwise, looks good to me.

This revision is now accepted and ready to land.Mar 1 2022, 5:41 PM
cem requested changes to this revision.Mar 1 2022, 5:56 PM

Setting cstd seems strongly preferable vs making upstream updates more difficult.

This revision now requires changes to proceed.Mar 1 2022, 5:56 PM
  • use CSTD=c11

I had no idea about the above var. I tried passing -std=c11 in cflags but that was failing.

This revision is now accepted and ready to land.Mar 1 2022, 6:33 PM
This revision was automatically updated to reflect the committed changes.