Skip to content

Commit

Permalink
Update on "Improve complex lerp performance"
Browse files Browse the repository at this point in the history
The complex lerp kernel uses `std::abs(z) < 0.5` which involves
computing a sqrt. Instead compare the square against 0.25 has much
lower latency and so performs much better overall.

In a simple timeit benchmark I see more than 10x speedup on CPU for a 4096
element complex lerp, from 84 us to 6.7 us.

[ghstack-poisoned]
  • Loading branch information
peterbell10 committed Sep 20, 2022
2 parents 8ee5992 + 4d6c33d commit 25fe4f7
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 25fe4f7

Please sign in to comment.