diff --git a/benches/LATEST.md b/benches/LATEST.md index d8e6b9de10807..c2f1798c6c9f0 100644 --- a/benches/LATEST.md +++ b/benches/LATEST.md @@ -1,6 +1,6 @@ # 📊 Foundry Benchmark Results -**Generated at**: 2025-07-23 09:01:16 UTC +**Generated at**: 2025-07-18 23:05:00 UTC ## Forge Test @@ -8,36 +8,30 @@ 1. [ithacaxyz/account](https://github.com/ithacaxyz/account) 2. [Vectorized/solady](https://github.com/Vectorized/solady) +3. [sparkdotfi/spark-psm](https://github.com/sparkdotfi/spark-psm) +4. [Uniswap/v4-core](https://github.com/Uniswap/v4-core) + ### Foundry Versions -- **stable**: forge Version: 1.2.3-stable (a813a2c 2025-06-08) -- **nightly**: forge Version: 1.3.0-nightly (cb8f3bf 2025-07-23) +- **v1.2.3**: forge Version: 1.2.3-v1.2.3 (a813a2c 2025-06-08) +- **nightly-05918765cb239024e9ca396825abb9f46257419a**: forge Version: 1.2.3-nightly (0591876 2025-07-15) +- **nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085**: forge Version: 1.3.0-nightly (0af4341 2025-07-17) -| Repository | stable | nightly | -|------------|----------|----------| -| ithacaxyz-account | 5.44 s | 4.91 s | -| solady | 3.02 s | 2.76 s | +| Repository | v1.2.3 | nightly-05918765cb239024e9ca396825abb9f46257419a | nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085 | +| -------------------- | ------- | ------------------------------------------------ | ------------------------------------------------ | +| ithacaxyz-account | 6.74 s | 3.24 s | 3.52 s | +| solady | 2.77 s | 2.76 s | 2.71 s | +| sparkdotfi-spark-psm | 1m 3.7s | 1m 1.2s | 1m 5.3s | +| Uniswap-v4-core | 8.04 s | 7.58 s | 8.44 s | ## Forge Fuzz Test -| Repository | stable | nightly | -|------------|----------|----------| -| ithacaxyz-account | 5.27 s | 4.90 s | -| solady | 2.89 s | 2.82 s | - -## Forge Test (Isolated) - -### Repositories Tested - -1. [Vectorized/solady](https://github.com/Vectorized/solady) -### Foundry Versions - -- **stable**: forge Version: 1.2.3-stable (a813a2c 2025-06-08) -- **nightly**: forge Version: 1.3.0-nightly (cb8f3bf 2025-07-23) - -| Repository | stable | nightly | -|------------|----------|----------| -| solady | 3.21 s | 2.88 s | +| Repository | v1.2.3 | nightly-05918765cb239024e9ca396825abb9f46257419a | nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085 | +| -------------------- | ------ | ------------------------------------------------ | ------------------------------------------------ | +| ithacaxyz-account | 3.92 s | 3.37 s | 3.52 s | +| solady | 2.96 s | 2.66 s | 2.82 s | +| sparkdotfi-spark-psm | 3.68 s | 3.52 s | 3.63 s | +| Uniswap-v4-core | 8.06 s | 7.82 s | 8.31 s | ## Forge Build @@ -45,42 +39,55 @@ 1. [ithacaxyz/account](https://github.com/ithacaxyz/account) 2. [Vectorized/solady](https://github.com/Vectorized/solady) +3. [sparkdotfi/spark-psm](https://github.com/sparkdotfi/spark-psm) +4. [Uniswap/v4-core](https://github.com/Uniswap/v4-core) + ### Foundry Versions -- **stable**: forge Version: 1.2.3-stable (a813a2c 2025-06-08) -- **nightly**: forge Version: 1.3.0-nightly (cb8f3bf 2025-07-23) +- **v1.2.3**: forge Version: 1.2.3-v1.2.3 (a813a2c 2025-06-08) +- **nightly-05918765cb239024e9ca396825abb9f46257419a**: forge Version: 1.2.3-nightly (0591876 2025-07-15) +- **nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085**: forge Version: 1.3.0-nightly (0af4341 2025-07-17) ### No Cache -| Repository | stable | nightly | -|------------|----------|----------| -| ithacaxyz-account | 2.58 s | 2.79 s | -| solady | 3.79 s | 3.89 s | +| Repository | v1.2.3 | nightly-05918765cb239024e9ca396825abb9f46257419a | nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085 | +| -------------------- | -------- | ------------------------------------------------ | ------------------------------------------------ | +| ithacaxyz-account | 9.32 s | 9.32 s | 9.46 s | +| solady | 15.01 s | 14.97 s | 14.81 s | +| sparkdotfi-spark-psm | 13.42 s | 13.29 s | 13.28 s | +| Uniswap-v4-core | 2m 11.6s | 2m 7.4s | 2m 6.3s | ### With Cache -| Repository | stable | nightly | -|------------|----------|----------| -| ithacaxyz-account | 0.209 s | 0.458 s | -| solady | 0.096 s | 0.226 s | +| Repository | v1.2.3 | nightly-05918765cb239024e9ca396825abb9f46257419a | nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085 | +| -------------------- | ------- | ------------------------------------------------ | ------------------------------------------------ | +| ithacaxyz-account | 0.203 s | 0.205 s | 0.201 s | +| solady | 0.092 s | 0.090 s | 0.094 s | +| sparkdotfi-spark-psm | 0.170 s | 0.174 s | 0.173 s | +| Uniswap-v4-core | 0.135 s | 0.139 s | 0.135 s | ## Forge Coverage ### Repositories Tested 1. [ithacaxyz/account](https://github.com/ithacaxyz/account) +2. [sparkdotfi/spark-psm](https://github.com/sparkdotfi/spark-psm) +3. [Uniswap/v4-core](https://github.com/Uniswap/v4-core) + ### Foundry Versions -- **stable**: forge Version: 1.2.3-stable (a813a2c 2025-06-08) -- **nightly**: forge Version: 1.3.0-nightly (cb8f3bf 2025-07-23) +- **v1.2.3**: forge Version: 1.2.3-v1.2.3 (a813a2c 2025-06-08) +- **nightly-05918765cb239024e9ca396825abb9f46257419a**: forge Version: 1.2.3-nightly (0591876 2025-07-15) +- **nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085**: forge Version: 1.3.0-nightly (0af4341 2025-07-17) -| Repository | stable | nightly | -|------------|----------|----------| -| ithacaxyz-account | 21.88 s | 22.52 s | +| Repository | v1.2.3 | nightly-05918765cb239024e9ca396825abb9f46257419a | nightly-0af43412f809c998d8b2fe69a1c9a789b7ebd085 | +| -------------------- | -------- | ------------------------------------------------ | ------------------------------------------------ | +| ithacaxyz-account | 16.33 s | 17.31 s | 16.43 s | +| sparkdotfi-spark-psm | 3m 52.9s | 4m 12.8s | 4m 15.0s | +| Uniswap-v4-core | 1m 40.6s | 1m 42.7s | 1m 47.5s | ## System Information - -- **OS**: linux +- **OS**: macos - **CPU**: 8 -- **Rustc**: rustc 1.88.0 (6b00bc388 2025-06-23) +- **Rustc**: rustc 1.90.0-nightly (3014e79f9 2025-07-15) diff --git a/benches/src/lib.rs b/benches/src/lib.rs index c8bb1e2329767..9efd28e0b9a2c 100644 --- a/benches/src/lib.rs +++ b/benches/src/lib.rs @@ -195,12 +195,14 @@ impl BenchmarkProject { /// * `command` - The command to benchmark /// * `runs` - Number of runs to perform /// * `setup` - Optional setup command to run before the benchmark series (e.g., "forge build") + /// * `prepare` - Optional prepare command to run before each timing run (e.g., "forge clean") /// * `conclude` - Optional conclude command to run after each timing run (e.g., cleanup) /// * `verbose` - Whether to show command output /// /// # Hyperfine flags used: /// * `--runs` - Number of timing runs /// * `--setup` - Execute before the benchmark series (not before each run) + /// * `--prepare` - Execute before each timing run /// * `--conclude` - Execute after each timing run /// * `--export-json` - Export results to JSON for parsing /// * `--shell=bash` - Use bash for shell command execution @@ -213,6 +215,7 @@ impl BenchmarkProject { command: &str, runs: u32, setup: Option<&str>, + prepare: Option<&str>, conclude: Option<&str>, verbose: bool, ) -> Result { @@ -240,6 +243,11 @@ impl BenchmarkProject { hyperfine_cmd.arg("--setup").arg(setup_cmd); } + // Add optional prepare command + if let Some(prepare_cmd) = prepare { + hyperfine_cmd.arg("--prepare").arg(prepare_cmd); + } + // Add optional conclude command if let Some(conclude_cmd) = conclude { hyperfine_cmd.arg("--conclude").arg(conclude_cmd); @@ -282,6 +290,7 @@ impl BenchmarkProject { runs, Some("forge build"), None, + None, verbose, ) } @@ -293,8 +302,16 @@ impl BenchmarkProject { runs: u32, verbose: bool, ) -> Result { - // No setup needed, uses existing cache - self.hyperfine("forge_build_with_cache", version, "forge build", runs, None, None, verbose) + self.hyperfine( + "forge_build_with_cache", + version, + "FOUNDRY_LINT_LINT_ON_BUILD=false forge build", + runs, + None, + Some("forge build"), + None, + verbose, + ) } /// Benchmark forge build without cache @@ -304,14 +321,15 @@ impl BenchmarkProject { runs: u32, verbose: bool, ) -> Result { - // Clean before the benchmark series + // Clean before each timing run self.hyperfine( "forge_build_no_cache", version, - "forge build", + "FOUNDRY_LINT_LINT_ON_BUILD=false forge build", runs, Some("forge clean"), None, + Some("forge clean"), verbose, ) } @@ -331,6 +349,7 @@ impl BenchmarkProject { runs, Some("forge build"), None, + None, verbose, ) } @@ -351,6 +370,7 @@ impl BenchmarkProject { runs, None, None, + None, verbose, ) } @@ -370,6 +390,7 @@ impl BenchmarkProject { runs, Some("forge build"), None, + None, verbose, ) }