Skip to content

Commit a301322

Browse files
authored
Enable compiler optimizations for WolframScript builds (#668)
## Changes I noticed that the `WolframModel` evolutions were taking an extremely long time to evaluate. I also noticed that the fairly straightforward evaluation of `RandomWolframModel` was completely locking up my computer. After looking at the dylib produced by `DevUtils/BuildLibSetReplace.m` I noticed that it was not being build with compiler optimizations, so I added them. ## Comments Fairly simple, low risk change here assuming we trust the compiler. Should yield more performance for all who want to use this library. :) ## Examples Run `./install.wls` to build with compiler optimizations.
1 parent 3727fe3 commit a301322

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DevUtils/BuildLibSetReplace.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@
173173

174174
$compileOptions = Switch[$OperatingSystem,
175175
"Windows",
176-
{"/std:c++17", "/EHsc"},
176+
{"/std:c++17 /O3", "/EHsc"},
177177
"MacOSX",
178-
Join[{"-std=c++17"}, $warningsFlags, {"-mmacosx-version-min=10.12"}], (* for std::shared_mutex support *)
178+
Join[{"-std=c++17 -O3"}, $warningsFlags, {"-mmacosx-version-min=10.12"}], (* for std::shared_mutex support *)
179179
"Unix",
180-
Join[{"-std=c++17"}, $warningsFlags]
180+
Join[{"-std=c++17 -O3"}, $warningsFlags]
181181
];
182182

183183
flushLibrariesIfFull[libraryDirectory_] := Scope[

0 commit comments

Comments
 (0)