Skip to content

AoT builds: use -O3 optimization level#202

Merged
Karolina-Bogacka merged 1 commit intomainfrom
GH-195/o3
Aug 25, 2025
Merged

AoT builds: use -O3 optimization level#202
Karolina-Bogacka merged 1 commit intomainfrom
GH-195/o3

Conversation

@Ostrzyciel
Copy link
Member

Issue #195

Change compiler options to optimize for speed, instead of size. This should lead to more aggressive inlining, which greatly benefits Jelly, but will also inevitably increase the binary size.

This does increase the binary size by quite a bit (up to 63M uncompressed), but compared with the latest release (jelly-cli-os), when compressed that's just 6MB more:

$ ls -lh
-rwxrwxr-x 1 piotr piotr  63M Aug 25 00:15 jelly-cli-o3
-rwxrwxr-x 1 piotr piotr  25M Aug 25 00:15 jelly-cli-o3.gz
-rwxrwxr-x 1 piotr piotr  46M Aug 22 21:16 jelly-cli-os
-rwxrwxr-x 1 piotr piotr  19M Aug 22 21:16 jelly-cli-os.gz
-rwxrwxr-x 1 piotr piotr  29M Aug 25 00:07 jelly-cli-skipflow-substitutes-nocharset
-rwxrwxr-x 1 piotr piotr  11M Aug 25 00:07 jelly-cli-skipflow-substitutes-nocharset.gz

With -Os (baseline):

$ time ./jelly-cli-skipflow-substitutes-nocharset rdf transcode nanopubs.jelly > /dev/null

real    1m56,292s
user    1m47,591s
sys     0m8,667s

With -O3:

$ time ./jelly-cli-o3 rdf transcode nanopubs.jelly > /dev/null

real    1m3,072s
user    0m54,912s
sys     0m8,142s

So, it also increased throughput by almost 2x. I think that's worth the extra few megabytes, especially because jelly-cli users mostly care about throughput...

Copy link
Collaborator

@Karolina-Bogacka Karolina-Bogacka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree with the priorities here

@Karolina-Bogacka Karolina-Bogacka merged commit 3ebabfc into main Aug 25, 2025
7 checks passed
@Karolina-Bogacka Karolina-Bogacka deleted the GH-195/o3 branch August 25, 2025 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants