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)
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)