treeform / pixie

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

opaque draw fastpath, simd mask magnifyBy2, float issue fix for 360deg rotation #346

Closed guzba closed 2 years ago

guzba commented 2 years ago

before:

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

magnifyBy2 ......................... 5.875 ms      6.298 ms    ±0.339   x783

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

magnifyBy2 ......................... 8.309 ms      8.411 ms    ±0.143   x592

after:

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

magnifyBy2 ......................... 5.776 ms      6.136 ms    ±0.310   x805

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

magnifyBy2 ......................... 1.120 ms      1.181 ms    ±0.072  x1000

before:

newMask(image) ..................... 0.654 ms      0.673 ms    ±0.028  x1000

after:

newMask(image) ..................... 0.530 ms      0.546 ms    ±0.025  x1000