Hi, I just did some experiments and it seems like the high system CPU time is not due to one specific part of the code, but rather to the extreme inefficiency of float emulation under Linux. I was expecting float emulation to run something like 30 times slower than integer, but it looks like its more like 3000 times slower. This means that all of the float operations must be removed for the code to work properly. ...or maybe there's a way to make the emulation in a library instead of making the kernel trap illegal instructions. Jean-Marc -- Jean-Marc Valin, M.Sc.A., ing. jr. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20031109/908a72de/signature-0001.pgp
> I just did some experiments and it seems like the high system CPU time > is not due to one specific part of the code, but rather to the extreme > inefficiency of float emulation under Linux. I was expecting float > emulation to run something like 30 times slower than integer, but it > looks like its more like 3000 times slower. This means that all of the > float operations must be removed for the code to work properly.Maybe I should just go on with my Sphinx project, in which I started to systematically remove all the floats. Christian --- >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.
Just out of curiosity, has anyone profiled the difference between the floating point and fixed point implementations on processors with decent floating point support? (i.e. x86, PPC). Just wondering if it makes things better or worse there. -SteveK <p><p>On Nov 9, 2003, at 2:08 PM, Jean-Marc Valin wrote:> Hi, > > I just did some experiments and it seems like the high system CPU time > is not due to one specific part of the code, but rather to the extreme > inefficiency of float emulation under Linux. I was expecting float > emulation to run something like 30 times slower than integer, but it > looks like its more like 3000 times slower. This means that all of the > float operations must be removed for the code to work properly. ...or > maybe there's a way to make the emulation in a library instead of > making > the kernel trap illegal instructions. > > Jean-Marc > > -- > Jean-Marc Valin, M.Sc.A., ing. jr. > LABORIUS (http://www.gel.usherb.ca/laborius) > Université de Sherbrooke, Québec, Canada--- >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.
Le dim 09/11/2003 à 14:33, Steve Kann a écrit :> Just out of curiosity, has anyone profiled the difference between the > floating point and fixed point implementations on processors with > decent floating point support? (i.e. x86, PPC).On recent x86 processors, floating point is faster than fixed-point. Jean-Marc -- Jean-Marc Valin, M.Sc.A., ing. jr. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20031109/fbff66dd/signature-0001.pgp
Jean-Marc Valin wrote:> Hi, > > I just did some experiments and it seems like the high system CPU time > is not due to one specific part of the code, but rather to the extreme > inefficiency of float emulation under Linux. I was expecting float > emulation to run something like 30 times slower than integer, but it > looks like its more like 3000 times slower. This means that all of the > float operations must be removed for the code to work properly. ...or > maybe there's a way to make the emulation in a library instead of making > the kernel trap illegal instructions.Is it a long job to remove the remaining floating point ops? Is it likely to be attainable this year? I would like to help if possible. MAL --- >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.
> > looks like its more like 3000 times slower. This means that all of the > > float operations must be removed for the code to work properly. ...or > > maybe there's a way to make the emulation in a library instead of making > > the kernel trap illegal instructions. > > Is it a long job to remove the remaining floating point ops? Is it likely > to be attainable this year? I would like to help if possible.I think it's attainable. Of course, it depends on how much time I have and how much help I get. I estimate that removing the remain float operation would probably take about 20-40 hours of work for the plain CBR (not including the VBR, VAD and all). There are also a couple things I don't like in the current port. One of them is that I'd like to reduce the amount of 32-bit operations (convert some things to 16-bit arithmetic). Jean-Marc -- Jean-Marc Valin, M.Sc.A., ing. jr. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 577 bytes Desc: Ceci est une partie de message numériquement signée Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20031109/571e3031/signature-0001.pgp
> Maybe I should just go on with my Sphinx project, in which I started to > systematically remove all the floats.I think it's better to just continue with the implementation I have. The main problem I see with code is that it makes heavy use of 64-bit arithmetic, which is not directly available on most platforms (DSP mainly use 16 bits) and would have to be emulated. Jean-Marc -- Jean-Marc Valin, M.Sc.A., ing. jr. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20031109/a35143b0/signature-0001.pgp