libretro / beetle-pce-libretro

Standalone hard fork of Mednafen PCE to libretro
GNU General Public License v2.0
27 stars 28 forks source link

Possible performance improvement, OWL resampler #81

Open Tatsuya79 opened 2 months ago

Tatsuya79 commented 2 months ago

I was playing around with the settings and noticed how the OWL resampler dramatically plays on the performance. From default 3 to 0 (lowest) I go from 700fps to 850fps. Max quality 6 gives me around 440fps. (I'm on a Ryzen 5600X)

I changed the code to reduce the quality there: https://github.com/libretro/beetle-pce-libretro/blob/3a75c7ce5fc62c524be8d0eb45cd4b39d08a885c/mednafen/sound/OwlResampler.cpp#L651 and there for the 0 preset: https://github.com/libretro/beetle-pce-libretro/blob/3a75c7ce5fc62c524be8d0eb45cd4b39d08a885c/mednafen/sound/OwlResampler.cpp#L631

It gives me around 1000fps average.

I tried to bypass the OWL resampler completely in pce.cpp (no sound out) and it gives me even a bit more, reaching 1100fps peak.

I'm not sure how to properly bypass all that stuff, handling the buffers and coding it properly to make it an option without nuking the original code. If anyone is interested.

mudl0rd commented 2 months ago

Would be nice to see how the libretro resampler fairs.