diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-12-31 11:44:43 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-12-31 11:49:02 -0800 |
commit | d9cbdaf1eda5a2116087149313b3005e7e0a57be (patch) | |
tree | d1fd7a60f1fd30a5be8496086abd848648df781d /src/libs/puddle | |
parent | 21101d536cca68a523655c16f4ce7aef8d22e79b (diff) |
libs/din: trivial optimizations
din() is a hot path for modules/swab in particular. Barring any
substantial changes to swab, which would probably make sense in
the long-term, there's some low-hanging fruit in libs/din.
Here smootherstep() has been made less general for a little perf
boost. The way din uses smootherstep() doesn't need these
bounds checks, nor does it need the caller-supplied edge values.
Also the asserts() have been disabled in the hot path as they
were mostly there for catching programmer errors and swab is
already done.
On my i7 x230 this takes swab from 44fps->54fps, so worthwhile,
but swab is still painfully slow here. It's largely just a
libs/din abuse module that was made to test libs/din, but turned
out to look interesting enough to keep.
Diffstat (limited to 'src/libs/puddle')
0 files changed, 0 insertions, 0 deletions