You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an irregularity on a handful of benchmarks where the duration was 10 times the typical duration, just because the assigned number of warm-up runs led to garbage collection on the timed run (or something like that).
In my example, select row took ~6ms when the number of warm-up runs was 0, 10, or 20. But it took 60ms with 5 warm-up runs.
I was using tinygo to compile to wasm, so it could be that specific allocator / runtime that leads to this issue.
The difference is easy to see in the screenshot below. goui-alt is the same app compiled with the standard go compiler. Tinygo performs better than Go for the most part, but the warm-up runs in a few instances can cause tinygo's runtime to be slow in a consistent way.
Just changing the number of warm-up runs to 8 completely changed the results:
Suggestion
Instead of 5 warm-ups for everything, why don't we make it rand(5), rand(10), or nth-run % 5?
The text was updated successfully, but these errors were encountered:
twharmon
changed the title
Number of warm-up runs should be random within a range
Number of warm-up runs should not be the same every time
Jan 12, 2024
So I think the problem you describe occurs only for WASM frameworks since they managed the memory on their own.
I'm not sure what's the best way to handle that.
Keeping GC for JS might penalize WASM frameworks
Removing GC from JS introduces noise that makes comparison between close contenders worthless
I think I'll check the next few days how big the impact is when including GC again. Maybe then randomizing the warmup count will make sense.
I found an irregularity on a handful of benchmarks where the duration was 10 times the typical duration, just because the assigned number of warm-up runs led to garbage collection on the timed run (or something like that).
In my example, select row took ~6ms when the number of warm-up runs was 0, 10, or 20. But it took 60ms with 5 warm-up runs.
I was using tinygo to compile to wasm, so it could be that specific allocator / runtime that leads to this issue.
The difference is easy to see in the screenshot below.
![results](https://private-user-images.githubusercontent.com/16892444/296125968-a6a7f958-8d2f-4c3f-be41-e5da32a0dfea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxMjQ3NzgsIm5iZiI6MTcxOTEyNDQ3OCwicGF0aCI6Ii8xNjg5MjQ0NC8yOTYxMjU5NjgtYTZhN2Y5NTgtOGQyZi00YzNmLWJlNDEtZTVkYTMyYTBkZmVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIzVDA2MzQzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwZjkyYjIzMGI2NGM5NDUxYTA2OWYzZDQzMGEwY2Q3N2M5MmNmMjljNzMwY2Y2OTMwNDI4NGVmYzExNjc4OWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UT_GXVNWd73OslSvPLkqpjcQgAr3btOaJd3PY3IOO-w)
goui-alt
is the same app compiled with the standard go compiler. Tinygo performs better than Go for the most part, but the warm-up runs in a few instances can cause tinygo's runtime to be slow in a consistent way.Just changing the number of warm-up runs to 8 completely changed the results:
![8warmups](https://private-user-images.githubusercontent.com/16892444/296133685-15397e0a-1899-4d88-af77-156113c29606.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxMjQ3NzgsIm5iZiI6MTcxOTEyNDQ3OCwicGF0aCI6Ii8xNjg5MjQ0NC8yOTYxMzM2ODUtMTUzOTdlMGEtMTg5OS00ZDg4LWFmNzctMTU2MTEzYzI5NjA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIzVDA2MzQzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ3ZmNiYTA4NjhiZDFiODkxNzUwZWMyYzcxMzgyMmEwZjE0ZWRjZjRiZDBiMmZmODNiOTM0MGE1NGExMjE1NWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xwlb-bqTBaUy-Qo1_EVRQwTOZyLuOJOFsHGs-oslT50)
Suggestion
Instead of 5 warm-ups for everything, why don't we make it
rand(5)
,rand(10)
, ornth-run % 5
?The text was updated successfully, but these errors were encountered: