Released version vs. source compiled - optimizations?

One “bug” I recently found appears to differ between the packaged and released version of Julia and the one I compile from source.

Extra allocations associated with unused ArgumentError · Issue #37639 · JuliaLang/julia (

Are there extra optimizations turned on for the final build that aren’t used by default for development? And if so, should it affect the example there, or is it unintended and something to address?

The locally built version uses a CPU_TARGET of native while Julia itself uses "generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" (see System Image Building · The Julia Language).

Whether that is the cause of the difference, I don’t know.


I’m not seeing a difference, but also not sure if I did it right.

make JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"


Nevermind, I guess whatever it was, after 1.5.2-pre.29, wasn’t kept in for 1.5.3 but is in for 1.6.0?

1.6.0-beta1, the released version, does have the behavior. Unless there’s also a difference between beta and full release? :upside_down_face:

What do you mean by full release? Are you building from the master or the release-1.6 branch?

The copy of 1.6.0-beta1 from Download Julia has the behavior I noted (unnecessary allocations), as does the copy I build from the master branch of the repository with make.

But I may have mislead myself on the cause. It sounds like it’s related to a change that was made to compiling throw blocks in the 1.6 branch.

Note that the 1.6 beta gets built off the release-1.6 branch, not the latest master branch. Once 1.6 was branched off, only bug fixes are backported to release-1.6, so if you observe any differences between the two, that’s most likely due to this, not the way it was built. You can download nightlies from the website as well, which always get built off the current master branch.