> I usually try to compile with -d:release but it takes longer and I often 
> forget.

You can use `config.nims` to stop relying on your memory for this. Here I add 
LTO flags for release/danger builds. You can also just set it to build in 
release mode by default. 
    
    
    --gc:arc
    
    if defined(release) or defined(danger):
      --opt:speed
      --passC:"-flto"
      --passL:"-flto"
    
    
    Run

Here's an example of using a small bash script for building with gcc PGO: 
<https://forum.nim-lang.org/t/7926#51699>

Reply via email to