Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary doubled in size #129

Open
PallHaraldsson opened this issue May 19, 2023 · 2 comments
Open

Binary doubled in size #129

PallHaraldsson opened this issue May 19, 2023 · 2 comments

Comments

@PallHaraldsson
Copy link
Contributor

In in example docs (used the code there):

shell> ls -alh hello
-rwxrwxr-x. 1 user user 8.4K Oct 20 20:36 hello

in my case:
shell> ls -alh hello
-rwxrwxr-x 1 pharaldsson pharaldsson 16K maí 19 16:39 hello

Is it known why? I used 1.9.0, the possible reason?

@brenhinkeller
Copy link
Collaborator

So I think this varies somewhat widely as a function of OS and architecture. That example was run on an intel mac; linux gave slightly larger binaries IIRC, and on my current arm mac the same example weighs in at 33k. It's possible that binary size also changed as a function of something in this package, but one would have to run a systematic comparison to be sure.

If we generally want to prioritize binary size, there are likely compiler flags we could specify on e.g. this line
https://github.com/tshort/StaticCompiler.jl/blob/51db924b140593cb31aea1f386e139940a1402ea/src/StaticCompiler.jl#L497or via the cflags kwarg. If you want to experiment with this it could be a nice thing to add to the docs!

@PallHaraldsson
Copy link
Contributor Author

I can look into it a bit. It's not a huge priority to me or anyone, likely a fixed overhead.

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

No branches or pull requests

2 participants