hi all,
pd's handling of denormals could definitely be inproved ...
the question is, if a branch free algorithm improves the performance... the quantization relies on two floating point performances, if the number is a denormal, it will cause one denormal operation. the PD_BADFLOAT macro does no floating point operation at all ...
another branch free possibility would be to do something like:
f*= !PD_BADFLOAT(f);
which would be branch free. the question is, it that would cause a denormal operation, concerning jan depner, it depends on the compiler, but pd is supposed to built on various compilers (gcc, icc, msvc ...)
it would probably be neccessary to do a few benchmarks in order to figure out, what's giving the best performance ... the most efficient solution would probably be to rewrite the specific functions using sse instructions if available, on the specific platform...
cheers ... tim