Silly I know, however I care about running tests as fast as possible, before I forget what I was testing for.
Project to be tested: build of Sushiswap exchange. About 50 smart contracts with lots of dependencies between them makes a good benchmark
hardhat test
starting from the slowest to the fastest
SLOW: Test Hardware 1:
macbook pro 13 2017 (cheapest model) — cost now ~$500
i5 dual core 2,3Ghz, 8GB LPDDR3
56 seconds
Conclusion: painfully slow but more bothering is the hearing the fans at max noise when the tests were run.
SLOW: Test Hardware 2:
Microsoft Surface Laptop 1 – i7 7200U CPU 8GB RAM — cost now ~$300
52 seconds
Conclusion: painfully slow but there are no fans! + much cheaper than the macbook pro 13 2007
Okish: Test Hardware 2:
desktop
Mac Mini M1, 8GB RAM, 256 GB HDD (cheapest model) — cost now ~$669
~38–40 seconds
noets: CPU at 26% RAM at 75%, HDD at ~200 MB/sec
Conclusion Mac Mini M1: you should try for 16GB RAM if you have the $…
FAST: Test Hardware 3:
Lenovo Legion 5 PRO — 16"
CPU: Ryzen 5800H, 16GB RAM, NVME PCIE x4 something, Ubuntu 20.04 — cost now $2000
34 seconds
Conclusion: wow, beats the mac mini m1 (but costs $2,000 vs $669… )
note: same test performed inWindows 10 on another disk, takes 36 seconds (so Linux is a bit faster than windows)
BEST: Test Hardware 3:
desktop
Ryzen 5600x, 16 GB RAM, nvme 970 EVO 512GB, Ubuntu 20.04 (cost ~$1000)
CPU at 30%. RAM used ~ 700MB
27 seconds
Conclusion: best performance / money…but you’re tied to a desktop
Do you want to contribute to this post with your hardware bencharks ?
If yes, it’s very simple
git clone git@github.com:sushiswap/sushiswap.git
(or https://github.com/sushiswap/sushiswap.git)
cd sushiswap
remove the -verbose argument from the package.json test script
npm install
npm run test
run the test couple of times and post your results in a comment here.