Hi, I noticed that you changed all constant floating point numbers from double notation (e.g. 3.0) to float notation (3.0f) in the latest version of Speex (in subversion). Did that give any performance increase (because of elimination of the float to double and double to float conversions)? Best regards, Chris> When compiling in debug mode, I also get 530 warnings about double to > float conversions. In release mode I don't get these warnings because the > warning level is set to 1. Do these conversions impact performance? Ithink> it is because you use e.g. 16000.0 instead of 16000.0f but I'm wondering > if this causes computations to be done using doubles and then converted to > float > instead of working with floats all the time. If 32 bit float precision is > enough, maybe > it is better to use .0f everywhere? > > Best regards, > Chris--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> I noticed that you changed all constant floating point numbers > from double notation (e.g. 3.0) to float notation (3.0f) in the latest > version > of Speex (in subversion). > Did that give any performance increase (because of elimination of the > float to double and double to float conversions)?It does, with some compilers. Not doing it also (erroneously) gives errors with some compilers. <p>Segher --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Segher Boessenkool wrote:>> I noticed that you changed all constant floating point numbers >> from double notation (e.g. 3.0) to float notation (3.0f) in the latest >> version >> of Speex (in subversion). >> Did that give any performance increase (because of elimination of the >> float to double and double to float conversions)? > > > It does, with some compilers. Not doing it also (erroneously) gives > errors with some compilers.<p>It was based on my observations that using a gcc compiler flag to force floating point constants to be single-precision helped performance in a measurable way. This has the same effect without special flags on all compilers. -SteveK --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.