|
Oktatás * Programozás 1 * Szkriptnyelvek Teaching * Programming 1 (BI) Félévek Linkek * kalendárium |
Nim2 /
Compilation$ nim c prg.nim 𝥶Compiles the program in debug mode. Faster compilation, slower EXE. $ nim c -d:release prg.nim 𝥶Compiles the program in release mode. Slower compilation, fast EXE. The EXE is smaller. Create a small EXEI took the same program and compiled it with different options. File sizes are indicated. $ nim c prg.nim # 98336 bytes $ nim c -d:release prg.nim # 69288 bytes $ nim c -d:release --opt:size prg.nim # 38168 bytes $ nim c -d:release --opt:size --passL:-s prg.nim # 27120 bytes $ nim c -d:release --opt:size -d:quick --passL:-s prg.nim # 26912 bytes " Applying UPXIf you want to further minimize the size of the binary, you can also experiment with upx. Take the smallest binary and try these: $ upx <binary> # fast; good compression $ upx --best <binary> # better compression $ upx --lzma <binary> # even better than "--best" :) After UPX, always try the EXE to check if it still works. |
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |