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

perf: replace custom string interner with lasso #22

Merged
merged 2 commits into from
Jun 30, 2024
Merged

Conversation

DaniPopes
Copy link
Member

No description provided.

@DaniPopes DaniPopes changed the title perf: replace custom string interner with lasso chore: misc Jun 30, 2024
@DaniPopes DaniPopes marked this pull request as ready for review June 30, 2024 03:07
@DaniPopes DaniPopes changed the title chore: misc perf: replace custom string interner with lasso Jun 30, 2024
@DaniPopes
Copy link
Member Author

DaniPopes commented Jun 30, 2024

With the updated hashbrown & dashmap in the patch there is almost no difference in single-threaded performance while significantly improving multi-threaded performance.

Archiving results from CI:

iai::all::sulk_enter
  Baselines:                       |base
  Instructions:              133049|41635           (+219.560%) [+3.19560x]
  L1 Hits:                   185184|59785           (+209.750%) [+3.09750x]
  L2 Hits:                      158|85              (+85.8824%) [+1.85882x]
  RAM Hits:                     958|279             (+243.369%) [+3.43369x]
  Total read+write:          186300|60149           (+209.731%) [+3.09731x]
  Estimated Cycles:          219504|69975           (+213.689%) [+3.13689x]
iai::all::lex ci_lex_0:"empty"
  Baselines:                       |base
  Instructions:              135078|43590           (+209.883%) [+3.09883x]
  L1 Hits:                   188043|62563           (+200.566%) [+3.00566x]
  L2 Hits:                      204|100             (+104.000%) [+2.04000x]
  RAM Hits:                    1047|360             (+190.833%) [+2.90833x]
  Total read+write:          189294|63023           (+200.357%) [+3.00357x]
  Estimated Cycles:          225708|75663           (+198.307%) [+2.98307x]
iai::all::lex ci_lex_1:"simple"
  Baselines:                       |base
  Instructions:              146389|55989           (+161.460%) [+2.61460x]
  L1 Hits:                   203357|79393           (+156.140%) [+2.56140x]
  L2 Hits:                      223|134             (+66.4179%) [+1.66418x]
  RAM Hits:                    1137|580             (+96.0345%) [+1.96034x]
  Total read+write:          204717|80107           (+155.554%) [+2.55554x]
  Estimated Cycles:          244267|100363          (+143.384%) [+2.43384x]
iai::all::lex ci_lex_2:"verifier"
  Baselines:                       |base
  Instructions:              808442|697244          (+15.9482%) [+1.15948x]
  L1 Hits:                  1100285|946989          (+16.1877%) [+1.16188x]
  L2 Hits:                      462|210             (+120.000%) [+2.20000x]
  RAM Hits:                    1507|842             (+78.9786%) [+1.78979x]
  Total read+write:         1102254|948041          (+16.2665%) [+1.16266x]
  Estimated Cycles:         1155340|977509          (+18.1923%) [+1.18192x]
iai::all::lex ci_lex_3:"OptimizorClub"
  Baselines:                       |base
  Instructions:             2316247|2192130         (+5.66194%) [+1.05662x]
  L1 Hits:                  3102240|2943445         (+5.39487%) [+1.05395x]
  L2 Hits:                     1020|803             (+27.0237%) [+1.27024x]
  RAM Hits:                    2164|1734            (+24.7982%) [+1.24798x]
  Total read+write:         3105424|2945982         (+5.41219%) [+1.05412x]
  Estimated Cycles:         3183080|3008150         (+5.81520%) [+1.05815x]
iai::all::lex ci_lex_4:"UniswapV3"
  Baselines:                       |base
  Instructions:             6384893|6021756         (+6.03042%) [+1.06030x]
  L1 Hits:                  8545337|8107294         (+5.40307%) [+1.05403x]
  L2 Hits:                     7155|3953            (+81.0018%) [+1.81002x]
  RAM Hits:                    5700|4658            (+22.3701%) [+1.22370x]
  Total read+write:         8558192|8115905         (+5.44963%) [+1.05450x]
  Estimated Cycles:         8780612|8290089         (+5.91698%) [+1.05917x]
iai::all::parse ci_parse_0:"empty"
  Baselines:                       |base
  Instructions:              138629|47103           (+194.310%) [+2.94310x]
  L1 Hits:                   193047|67532           (+185.860%) [+2.85860x]
  L2 Hits:                      257|136             (+88.9706%) [+1.88971x]
  RAM Hits:                    1237|552             (+124.094%) [+2.24094x]
  Total read+write:          194541|68220           (+185.167%) [+2.85167x]
  Estimated Cycles:          237627|87532           (+171.474%) [+2.71474x]
iai::all::parse ci_parse_1:"simple"
  Baselines:                       |base
  Instructions:              163642|74025           (+121.063%) [+2.21063x]
  L1 Hits:                   228307|105477          (+116.452%) [+2.16452x]
  L2 Hits:                      392|313             (+25.2396%) [+1.25240x]
  RAM Hits:                    1904|1328            (+43.3735%) [+1.43373x]
  Total read+write:          230603|107118          (+115.279%) [+2.15279x]
  Estimated Cycles:          296907|153522          (+93.3970%) [+1.93397x]
iai::all::parse ci_parse_2:"verifier"
  Baselines:                       |base
  Instructions:             2054132|1957135         (+4.95607%) [+1.04956x]
  L1 Hits:                  3003382|2826171         (+6.27036%) [+1.06270x]
  L2 Hits:                    13244|12726           (+4.07041%) [+1.04070x]
  RAM Hits:                    5669|4918            (+15.2704%) [+1.15270x]
  Total read+write:         3022295|2843815         (+6.27608%) [+1.06276x]
  Estimated Cycles:         3268017|3061931         (+6.73059%) [+1.06731x]
iai::all::parse ci_parse_3:"OptimizorClub"
  Baselines:                       |base
  Instructions:             5354607|5192669         (+3.11859%) [+1.03119x]
  L1 Hits:                  7813938|7608379         (+2.70175%) [+1.02702x]
  L2 Hits:                    37066|33421           (+10.9063%) [+1.10906x]
  RAM Hits:                   11482|10894           (+5.39747%) [+1.05397x]
  Total read+write:         7862486|7652694         (+2.74141%) [+1.02741x]
  Estimated Cycles:         8401138|8156774         (+2.99584%) [+1.02996x]
iai::all::parse ci_parse_4:"UniswapV3"
  Baselines:                       |base
  Instructions:            14238062|13779467        (+3.32810%) [+1.03328x]
  L1 Hits:                 20441021|19883199        (+2.80549%) [+1.02805x]
  L2 Hits:                    90104|80111           (+12.4739%) [+1.12474x]
  RAM Hits:                   26144|25122           (+4.06815%) [+1.04068x]
  Total read+write:        20557269|19988432        (+2.84583%) [+1.02846x]
  Estimated Cycles:        21806581|21163024        (+3.04095%) [+1.03041x]

All the results factor enter in the final numbers, so the actual slow-down for single-threaded is about 2.5%.

@DaniPopes DaniPopes merged commit e3cf771 into main Jun 30, 2024
8 checks passed
@DaniPopes DaniPopes deleted the dani/try-lasso branch June 30, 2024 17:32
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