A small speedup trick for simple nimscript programs.

On my PC,
    
    
    echo "Hello, World"
    
    
    Run

`time nim e test.nims`
    
    
    real    0m0.104s
    user    0m0.103s
    sys     0m0.001s
    
    
    Run

`time nim e -d:nimPreviewSlimSystem test.nims`
    
    
    real    0m0.051s
    user    0m0.048s
    sys     0m0.001s
    
    
    Run

Unrelated, in this case, `genLiteral` and `sameConstant` consumes almost 10% of 
the execution time, which will be solved in [integers and floats constants use 
BiTable in VM](https://github.com/nim-lang/Nim/pull/21316).

Reply via email to