vleue / polyanya

Pathfinding using Polyanya
Apache License 2.0
266 stars 19 forks source link

Use .iter() in a few more for loops. Also uses a better .min and .max for f32 #3

Closed Elabajaba closed 2 years ago

Elabajaba commented 2 years ago

These changes combined give me a repeatable ~3-4% speedup over current main. There's probably another 5% available by rewriting some of the existing for loops as iter chains, but the early returns make it annoying/non trivial.

See the comments in https://github.com/svenstaro/bvh/pull/87 for the f32 asm comparison between std .min() and .max() and the included functions in this pr.

mockersf commented 2 years ago

thanks! seeing the same kind of improvement on my laptop