Use -fspecialize-aggressively to improve performance by 30% on ACME build#4584
Conversation
f-f
left a comment
There was a problem hiding this comment.
Very happy to merge this patch 😄
Can anyone else have a look?
garyb
left a comment
There was a problem hiding this comment.
Binary size went from 110MB to 130MB. I think this is fine and worth the speed improvements.
Seems like a reasonable tradeoff to me 👍
|
@MonoidMusician I am not sure where that should go, If it goes to The benefit of adding it to What do you think? |
I'm not sure how that follows. Is there a problem with adding it to just executable like I did? I am not a cabal/stack expert but it did seem to build me a binary with optimizations. I guess any solution that adds it to purs-the-binary and does not require it on purescript-the-library is fine with me. |
|
Both would work for the release-distributed builds, but for Hackage-based installs it would need to be in |
|
This one is quite subtle actually, the inlining/specialisation would only apply to the |
…uild (purescript#4584) * Use -fspecialize-aggressively to improve performance * add fspecialize to cabal project

Description of the change
Use -flag-fspecialise-aggressively to improve performance by 30% on ACME build.
Stats for ACME build before change
Stats for ACME build after change
Binary size went from 110MB to 130MB. I think this is fine and worth the speed improvements.
Compilation time of purs takes longer, but when dev we can always use
stack --fastRepo with acme build: https://github.com/seastian/purs-acme
Yes we spend so much time doing GC 🫣, much of it can be improved by using different RTS options (
+RTS -A256m -n16m -RTS) at the cost of more ram.What do you all think?
Checklist: