treeform / pixie

Full-featured 2d graphics library for Nim.
MIT License
743 stars 28 forks source link

faster vertical and horizontal gradients #324

Closed guzba closed 2 years ago

guzba commented 2 years ago

nim c --gc:arc -r -d:release --debugger:native .\tests\benchmark_paints.nim

before:

name ............................... min time      avg time    std dv   runs
GradientLinear vertical ........... 32.084 ms     32.125 ms    ±0.072   x156
GradientLinear horizontal ......... 32.072 ms     32.156 ms    ±0.165   x156

after:

name ............................... min time      avg time    std dv   runs
GradientLinear vertical ............ 0.228 ms      0.231 ms    ±0.005  x1000
GradientLinear horizontal .......... 0.375 ms      0.382 ms    ±0.005  x1000