RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
15.18k stars 1.89k forks source link

Need for Speed: Most Wanted - LLVM runs slower than ASMJIT #14752

Open Ordinary205 opened 11 months ago

Ordinary205 commented 11 months ago

Quick summary

Using LLVM recompiler runs significantly slower than ASMJIT.

Details

Heres the performance comparison between LLVM and ASMJIT.

LLVM recompiler: 9.2/10.8/11.8 FPS

Screenshot ![LLVM](https://github.com/RPCS3/rpcs3/assets/125112932/9c99f150-c187-4c2d-9f69-cde3fbc775bb)

ASMJIT recompiler: 14.8/16.8/18.4 FPS

Screenshot ![ASMJIT](https://github.com/RPCS3/rpcs3/assets/125112932/30908150-1dcd-448e-b55f-388ee84b65d8)

I disabled the RSX tiled memory to show better performance results. The strange thing about LLVM is that it's supposed to be faster than/tied with ASMJIT, which is why I thought it would be necessary to post this bug.

Attach a log file

LLVM.log.gz

ASMJIT.log.gz

Attach capture files for visual issues

No response

System configuration

AMD Ryzen 5900X 12-Core Processor | 24 Threads | 15.89 GiB RAM | RTX 3080 driver 545.84.0.0 | Windows 10 Pro 22H2

Other details

No response

Ordinary205 commented 9 months ago

I've done some research by testing other SPU options. I've noticed that SPU Interpreter dynamic slightly improves the performance over ASMJIT, although this does causes a huge audio slowdown when enabling these options.

ASMJIT: 15.3/16.8/18.1 FPS

Screenshot ![ASMJIT](https://github.com/RPCS3/rpcs3/assets/125112932/00f67304-8ab2-4129-bdcd-864f5af6b8ad)

Interpreter dynamic: 16.4/17.4/18.5 FPS

Screenshot ![SPU dynamic](https://github.com/RPCS3/rpcs3/assets/125112932/71594904-90f1-4cb8-badc-31a27387beae)

Interpreter static: 10.5/12.2/13.2 FPS

Screenshot ![SPU static](https://github.com/RPCS3/rpcs3/assets/125112932/cc659ca9-c5e3-4e7d-9f06-b546b7deefb9)

I've ranked each SPU options from slowest to fastest:

  1. Interpreter dynamic (fastest)
  2. ASMJIT recompiler
  3. Interpreter static
  4. LLVM recompiler (slowest)

The ASMJIT performance seems to have regressed when enabling RSX tiled memory, while the LLVM performance works totally fine.

nonetrix commented 1 month ago

I am getting opposite effect on my "lower end" system that struggles to play the game (Ryzen 7 3700x), with tweaks enabled to fix graphics I get 10 to 8 FPS with ASMJIT then with LLVM 12 to 10 maybe less than it should be not sure but more. Upgrading my CPU soon though hope I can play this game at playable FPS soon graphics look fine now