treeform / pixie

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

faster path filling again #316

Closed guzba closed 3 years ago

guzba commented 3 years ago

before: svg decode ........................ 18.183 ms 18.360 ms ±0.167 x272

after: svg decode ........................ 17.021 ms 17.161 ms ±0.111 x291

The win here is from 2 things: 1) Computing and storing m and b for each segment and using that for each hit instead of calculating it every time 2) Removing a float64 that snuck in through a constant (results in the file changes)