treeform / pixie

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

a little faster partitioning, runtime-checked avx fill #450

Closed guzba closed 2 years ago

guzba commented 2 years ago

before:

fill ............................... 0.200 ms      0.205 ms    ±0.010  x1000
fill_rgba .......................... 0.200 ms      0.207 ms    ±0.011  x1000

after:

fill ............................... 0.148 ms      0.154 ms    ±0.012  x1000
fill_rgba .......................... 0.147 ms      0.153 ms    ±0.009  x1000

before:

[pixie] rect opaque ................ 0.047 ms      0.049 ms    ±0.001  x1000
[pixie] rect not opaque ............ 0.130 ms      0.131 ms    ±0.002  x1000
[pixie] roundedRect opaque ......... 0.095 ms      0.098 ms    ±0.004  x1000
[pixie] roundedRect not opaque ..... 0.248 ms      0.250 ms    ±0.005  x1000
[pixie] heart opaque ............... 0.257 ms      0.260 ms    ±0.002  x1000
[pixie] heart not opaque ........... 0.473 ms      0.480 ms    ±0.015  x1000
[pixie] tiger ..................... 10.025 ms     10.116 ms    ±0.104   x493

after:

[pixie] rect opaque ................ 0.042 ms      0.046 ms    ±0.005  x1000
[pixie] rect not opaque ............ 0.130 ms      0.131 ms    ±0.003  x1000
[pixie] roundedRect opaque ......... 0.087 ms      0.094 ms    ±0.006  x1000
[pixie] roundedRect not opaque ..... 0.248 ms      0.252 ms    ±0.011  x1000
[pixie] heart opaque ............... 0.255 ms      0.258 ms    ±0.003  x1000
[pixie] heart not opaque ........... 0.472 ms      0.477 ms    ±0.010  x1000
[pixie] tiger ..................... 10.005 ms     10.086 ms    ±0.097   x495