Skip to content

Conversation

@atarpara
Copy link
Collaborator

@atarpara atarpara commented Dec 3, 2025

Description

Don't merge till #1505.

Added src/utils/clz folder.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Ran forge fmt?
  • Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

@atarpara
Copy link
Collaborator Author

CLZ-based gas optimizations across LibBit, FixedPointMathLib, and LibZip

Library Test function name Baseline CLZ Delta
LibBit testCLZ 306425 182223 −124202
testFFS 152619 108858 −43761
testFLS 254381 150002 −104379
testCommonBytePrefix 1572 659 −913
testCountZeroBytesDifferential(bytes) 8785 7053 −1732
FixedPointMathLib testLog2 265326 136107 −129219
testLog2Up 318958 159794 −159164
testLog10 75973 54880 −21093
testLog256 22804 12553 −10251
testCbrt 10279 7118 −3161
testSqrt 45390 33640 −11750
testLambertW0WadMonotonicallyIncreasing 18356886 17296838 −1060048
LibZip testABCCdCompressAndDecompressGas 3915 3534 −381
testABCStoreWithCdCompressGas 24857 24476 −381
testCdCompress 16684 14047 −2637
testCdFallback 3150724 3052584 −98140
testFlzCompressDecompress 2745055 2731401 −13654
testFlzCompressDecompress2 742732 735518 −7214
testCdFallbackDecompressor(bytes) 196686 194844 −1842
test__codesize 23664 23511 −153

Copy link
Owner

@Vectorized Vectorized left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy sheets.

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

Successfully merging this pull request may close these issues.

3 participants