Menu

Why my Solidity test loop went from 56 seconds to under one
πŸ“°

Why my Solidity test loop went from 56 seconds to under one

DEV Community: rustΒ·borodutch.eth πŸ’ŽπŸ€²Β·about 6 hours ago
#76HsVqv3
#devtorust#devto#dev#test#tests
Reading 0:00
15s threshold

The contracts for a game I'm building have 303 tests, compiled with via-IR, and the biggest test file is 7,500 lines long. Editing one test and rerunning the suite took 56 seconds with Foundry and 61 with Hardhat 3. With plain , the toolchain I wrote, the same edit and rerun takes 0.99 seconds, on the same project, with the same foundry.toml and nothing changed in the code. Solc is the same too: what gets deployed is byte for byte what solc produces. The speed comes from not doing work twice, and this post is about where that work hides.

All numbers below are medians from hyperfine on an M1 Max, measured on October 17, 2026, with forge 1.7.1, Hardhat 3.20.0 and the solc each project pins.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.