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

⚡️ Tidy and optimize LibString #1099

Merged
merged 1 commit into from
Oct 2, 2024
Merged

⚡️ Tidy and optimize LibString #1099

merged 1 commit into from
Oct 2, 2024

Conversation

Vectorized
Copy link
Owner

Description

♻️

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.

Copy link

github-actions bot commented Oct 2, 2024

Gas Snapshot Comparison Report

Generated at commit : ce832b8, Compared to commit : 79f2c77

Contract Name Test Name Main Gas PR Gas Diff
Base64Test test__codesize() 6841 6816 -25
ERC1271Test testIsValidSignature() 2390984 2390883 -101
test__codesize() 29885 29878 -7
JSONParserLibTest testDecodeInvalidStringReverts() 172924 172813 -111
testDecodeString() 193269 193119 -150
testParseInt() 204229 204099 -130
testParseInvalidIntReverts() 210681 210550 -131
testParseInvalidNumberReverts() 4068682 4067432 -1250
testParseInvalidReverts() 8589165 8587164 -2001
testParseInvalidStringReverts() 2117157 2116357 -800
testParseInvalidUintReverts() 308887 308736 -151
testParseJWTGas() 50023 50006 -17
testParseRecursiveObject() 94907 94896 -11
testParseSpecials() 260199 260188 -11
testParseString() 1237483 1237179 -304
testParseUint() 95659 95589 -70
testParseUintFromHex() 1382724 1385870 3146
test__codesize() 38087 38063 -24
LibCloneTest testCloneDeterministicWithImmutableArgs() 128890 128886 -4
testCloneWithImmutableArgs() 129436 129432 -4
testDeployERC1967BeaconProxyWithImmutableArgs() 879000 878998 -2
LibStringTest testContains() 44000 43926 -74
testStringEscapeHTML() 8427 7973 -454
testStringEscapeJSON() 39797 39401 -396
testStringEscapeJSONHexEncode() 712815 709115 -3700
testStringIndexOf() 17375 17329 -46
testStringIndicesOf() 11700 11542 -158
testStringLowerDifferential() 3725445 3411555 -313890
testStringPackAndUnpackOne() 4029923 737456 -3292467
testStringPackAndUnpackTwo() 896840 895109 -1731
testStringRepeat() 4986 4936 -50
testStringReplaceLong() 8573 8136 -437
testStringReplaceMedium() 7581 7319 -262
testStringReplaceShort() 12329 11654 -675
testStringSlice() 9257 9239 -18
testStringSplit() 20309 20211 -98
testStringUpperDifferential() 3084191 3110704 26513
testToStringPositiveNumberBrutalized() 588450 586828 -1622
testToStringUint256MaxBrutalized() 600016 598361 -1655
testToStringZeroBrutalized() 587988 586333 -1655
test__codesize() 46388 46318 -70
MetadataReaderLibTest testReadBytes32StringTruncated() 775178 775102 -76
testReadStringChopped() 272350 272322 -28

@Vectorized Vectorized merged commit 7f7e732 into main Oct 2, 2024
18 checks passed
@Vectorized Vectorized deleted the tidy-opt-libstring branch October 2, 2024 07:04
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.

1 participant