miegl / PiFmAdv

Advanced Raspberry Pi FM transmitter with RDS encoding
GNU General Public License v3.0
487 stars 82 forks source link

Higher CPU usage with doubles #62

Closed Anthony96922 closed 2 years ago

Anthony96922 commented 5 years ago

Usage of double over float leads to higher CPU usage. Using the stereo_44100.wav file, top showed 63% total CPU usage. When I replaced all occurrences of double with float and recompiled, top showed 55% usage with the same audio. This test was done on a Raspberry Pi 1.

miegl commented 5 years ago

Yep I know, I plan on improving this mess but I don't have time now. Will keep the issue open to track other possible improvents.

Anthony96922 commented 5 years ago

I'll clean up the code on my fork. Hopefully I can do other stuff to make it run more efficiently.