Skip to content

Potential performance gain by reducing interpreter's CPU_RATIO #1

@dakrk

Description

@dakrk

The interpreter currently throttles itself quite a lot as to try and make sure it can be stable, consequently making lag you get emulated lag that hopefully triggers the game to activate a frameskip, as opposed to emulator lag. The issue with this now however is that the CPU_RATIO value located inside core/hw/sh4/sh4_interpreter.cpp (or sh4_interpreter.h in current upstream) isn't really representative of what modern hardware can push, with the current ratio of 8 being chose almost 13 years ago. By reducing this ratio, you should be able to get a performance gain on modern hardware. On my desktop computer with a native build of recent(ish) Flycast, a ratio of 3 is about as low as it can go without causing the emulator to stutter, but may be different for you with this due to WASM overhead and other factors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions