I've just noticed sth very weird.
I have 2 different tasks in my _nimble_ file. One builds the project with
\--opt:size and one with \--opt:speed. The thing is the resulting binary with
the first option is over 900KB, while with \--opt:speed it get down to
600-sth(!). How is that possible?
Nim version: 1.0.3 [MacOSX: amd64] - Compiled at 2019-11-09 (git hash:
7ea60f78b5bd90bd34c5b15e1a80d23fd41c36a8)
command options for 'mini' build:
nim c --gcc.options.speed="-O4 -Ofast -flto -march=native
-fno-strict-aliasing -ffast-math -ldl" --gcc.options.linker="-flto -ldl"
--clang.options.speed="-O4 -Ofast -flto -march=native -fno-strict-aliasing
-ffast-math -ldl" --clang.options.linker="-flto -ldl" -d:release -d:mini
-d:danger --passL:parser.a --threads:on --hints:off --opt:speed --gc:regions
--path:src -o:arturo -f --nimcache:_cache --embedsrc --checks:off
--overflowChecks:on src/main.nim
Run
command options for 'full' (speed) build:
nim c --gcc.options.speed="-O4 -Ofast -flto -march=native
-fno-strict-aliasing -ffast-math -ldl" --gcc.options.linker="-flto -ldl"
--clang.options.speed="-O4 -Ofast -flto -march=native -fno-strict-aliasing
-ffast-math -ldl" --clang.options.linker="-flto -ldl" -d:release -d:danger
--passL:parser.a --threads:on --hints:off --opt:speed --gc:regions --path:src
-o:arturo -f --nimcache:_cache --embedsrc --checks:off --overflowChecks:on
src/main.nim
Run
Any ideas?