Dolphin, the GameCube and Wii emulator - Forums
Fastmem - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Development Discussion (https://forums.dolphin-emu.org/Forum-development-discussion)
+--- Thread: Fastmem (/Thread-fastmem)



Fastmem - Miksel12 - 06-22-2020

As far as I know, Yuzu doesn't use Fastmem. But the performance on a modern midrange pc seems to be really good when using Yuzu. This PR for Dynarmic: https://github.com/MerryMage/dynarmic/pull/528 adds Fastmem but it seems that the performance difference is not as big as with Dolphin. With Dolphin the difference I have seen between Fastmem and non-Fastmem can range between 1.5 and 4x.

I was wondering if this is because of the difference between Wii and Switch or if the implementation is different?


RE: Fastmem - merry - 06-28-2020

dynarmic has multiple methods for memory access.

The simplest method is with callbacks on each memory read / write. This is what dolphin does when fastmem is disabled (± some optimisations around predictable addresses).

One thing that dynarmic does that dolphin does not is: Inlining page-table access code into emitted code. This is much faster than a function call.

Fastmem does not really as big of a speed improvement over inlined page-table access because it's a smaller reduction in codesize per emulated memory access.


RE: Fastmem - Miksel12 - 06-28-2020

I see, thanks for your answer. Is implementing inlined page-table in Dolphin possible? And would/could it make memory locking trivial performance wise?