8000 bump sonatina; change optimize cli flag and defaults by sbillig · Pull Request #1332 · argotorg/fe · GitHub
[go: up one dir, main page]

Skip to content

bump sonatina; change optimize cli flag and defaults#1332

Merged
sbillig merged 1 commit intoargotorg:masterfrom
sbillig:sona-bump
Mar 12, 2026
Merged

bump sonatina; change optimize cli flag and defaults#1332
sbillig merged 1 commit intoargotorg:masterfrom
sbillig:sona-bump

Conversation

@sbillig
Copy link
Collaborator
@sbillig sbillig commented Mar 12, 2026

Bumped to include sonatina's multi-block inliner.

--opt-level is now --optimize/-O, and defaults to 2, options are 0, 1, 2, s. For now, 1 is the same as 2. s is the same as 2, except that the inliner settings are tuned to avoid code growth. In practice, both -Os and -O2 should be tested to see which performs best. We need to improve the inliner rules, ideally to be more evm-aware.

fe_test gas usage before and after. Note that the "call" gas often includes create2 calls and is thus dominated by deployment costs (we need better benchmarking). Sorted by master Sonatina total gas, top 20 common comparable cases. delta = inliner2 - master, so negative is better.

Test case Call master Call inliner2 Call delta Call delta % Total master Total inliner2 Total delta Total delta %
vault/test_vault_multiuser 688,060 685,298 -2,762 -0.40% 2,036,551 2,037,109 +558 +0.03%
reentrancy_mutex_storage_map 726,995 714,075 -12,920 -1.78% 1,868,081 1,847,209 -20,872 -1.12%
escrow/test_escrow_release 659,078 674,988 +15,910 +2.41% 1,807,577 1,847,701 +40,124 +2.22%
erc20/test_erc20 598,481 578,425 -20,056 -3.35% 1,774,782 1,736,841 -37,941 -2.14%
mandelbrot/known_points 793,324 790,543 -2,781 -0.35% 1,757,358 1,749,175 -8,183 -0.47%
factory/test_factory 755,405 693,174 -62,231 -8.24% 1,646,812 1,553,688 -93,124 -5.65%
escrow/refund 643,910 660,394 +16,484 +2.56% 1,625,019 1,660,885 +35,866 +2.21%
mandelbrot/row 776,528 773,982 -2,546 -0.33% 1,566,614 1,526,848 -39,766 -2.54%
reentrancy_mutex 611,782 622,112 +10,330 +1.69% 1,492,914 1,516,809 +23,895 +1.60%
voting/test_voting 517,516 502,053 -15,463 -2.99% 1,481,838 1,457,798 -24,040 -1.62%
reentrancy_tstor_ptr 577,888 570,689 -7,199 -1.25% 1,423,757 1,411,108 -12,649 -0.89%
ownable/test_ownable 494,349 499,118 +4,769 +0.96% 1,311,035 1,320,192 +9,157 +0.70%
storage_map/test_storage_map 375,607 365,902 -9,705 -2.58% 1,210,203 1,195,576 -14,627 -1.21%
contract_field_mut_borrow_matrix 364,143 348,898 -15,245 -4.19% 1,202,682 1,174,726 -27,956 -2.32%
simple_amm/test_amm_basic 368,896 359,787 -9,109 -2.47% 1,164,568 1,148,457 -16,111 -1.38%
simple_amm/test_amm_edge_cases 359,680 350,930 -8,750 -2.43% 1,059,115 1,036,694 -22,421 -2.12%
coin/test_coin 351,555 346,971 -4,584 -1.30% 1,052,924 1,047,428 -5,496 -0.52%
mode_receivers_contract 261,247 256,687 -4,560 -1.75% 832,221 819,733 -12,488 -1.50%
effect_handle_field_deref 259,394 257,075 -2,319 -0.89% 816,504 815,895 -609 -0.07%
non_mem_effect_provider_m.. 306,011 302,911 -3,100 -1.01% 756,531 751,451 -5,080 -0.67%

@sbillig sbillig marked this pull request as draft March 12, 2026 21:29
@sbillig sbillig marked this pull request as ready for review March 12, 2026 21:52
@sbillig sbillig merged commit a677dc9 into argotorg:master Mar 12, 2026
6 checks passed
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

0