• General , 22.02.2013

    KDSbest this man has some future project and he now talked about RPCS3 emulator. For some reason the other party ignored on how to improve or make something better with this emulator for unknown reasons.
    Still KDSbest never gives up and has the upper hand (sometimes i think this guy is a robot) ;) Kudos!

    To quote:

    I took a deep look at the #RPCS3 emulator especialy the ppu emulation. It is possible to increase the performance alot. Since my time is big money I try to get some PoC stuff out. IMHO the performance can be increased by a multiple times. Starting with the decoder which is nicely writter TBH but not tweaked to the performance limit. Building a big switch case is just the wrong way.

    Don’t get me wrong they made a nice piece of software, but the lack of performance tweaking makes it a bad emulator. Instead of making things look nice they should focus more on pushing the performance to the limit. Look at Dolphine code it is plain ugly to use, but for the performance sake.

    I work on a recompiler, which TBH i never expect to be full featured on my work alone. This is way to much to handle for one person, but it should give #RPCS3 people a well knowledge what can be increased.

    First of all I try to show the improvements to the decoder, which will be sick.

    The thing is this, the decoder does alot of stuff which can be done at load time. Loading at startup is not interesting. The performance while it emulates is crucial.

    Second I always said it and I still need to say it again. Building a recompiler is not much harder than emulating the stuff like they do but the performance increase will be insane. I looked alot at recompiler codes lately to get a brief understanding how they work and it is doable for the PS3. I hope #RPCS3 guys will take my help instead of claiming false that their way is faster and reconstruct their emulator. Of course I want to get credit than, because this will be work not much people on this planet can do.

    To the decoder using binary search algorithms is way faster than doing the big switch case.

    If I manage to make this work I will try to give a presentation on CCC Congress or other congress that let me show this stuff since IMHO it is technically more interesting than what most of those congresses show.

    [Source] = KDSbest twitter

    Discuss in Forums (10)


  • 10 Comments

    1. tjhooker73
      02-22-2013
      08:12 PM
      1

      Link broken.. Why..

    2. Rautz
      02-22-2013
      08:15 PM
      2

      [MENTION=161049]tjhooker73[/MENTION]

      http://www.ps3hax.net/2013/02/rpcs3-...vices-ignored/

    3. defyboy
      02-22-2013
      08:42 PM
      3

      Improving compatibility and operational functionality trumps performance at such an early stage in the development cycle IMO.

      But then again, *****ing and whining usually gets things done. Keep up the good work.

    4. hellsing9
      02-22-2013
      09:22 PM
      4

      Originally Posted by tjhooker73
      Link broken.. Why..
      Because we have some problems with *read more*.
      Not the first nor the last time that this happens.

      If you don't give enough time for me to edit...well.
      Everytime i edit the article *read more* link get's all messed up.

    5. KDSBest
      02-22-2013
      10:46 PM
      5

      Originally Posted by defyboy
      Improving compatibility and operational functionality trumps performance at such an early stage in the development cycle IMO.

      But then again, *****ing and whining usually gets things done. Keep up the good work.
      I never talked about improving compatibility and doing it right will pay off in the end for sure. Doing it this way it needs to get refactored at the end when the code got big.

      And thanks for the kudos you guys just support me too well

    6. cboushell
      02-23-2013
      04:18 AM
      6

      Where does anyone get the idea that his suggestions are being ignored by the devs of this project? His suggestions were just given a couple of days ago. Did the devs of this project reply in some way that I don't know of?

    7. hellsing9
      02-23-2013
      06:32 AM
      7

      Originally Posted by cboushell
      Where does anyone get the idea that his suggestions are being ignored by the devs of this project? His suggestions were just given a couple of days ago. Did the devs of this project reply in some way that I don't know of?

    8. smf
      02-23-2013
      09:08 PM
      8

      Originally Posted by cboushell
      Where does anyone get the idea that his suggestions are being ignored by the devs of this project? His suggestions were just given a couple of days ago. Did the devs of this project reply in some way that I don't know of?
      If you work on a project like this you are often bombarded with advice from people you don't know on how to do things better. While in a few rare cases they might have a point, it's just not worth taking the time to find that out. Even when an idea sounds plausible, there might be a reason why implementing it is too hard or doesn't actually work out so well in practise because of reasons you haven't considered.

      You should implement the idea yourself and submit the patch if you want someone to take notice.

      One of the points about binary search instead of switch/case statements. Sometimes the compiler will actually implement it that way, it depends on which compiler and whether it thinks it will be faster that way. It also depends on the processor, because a big set of if checks might actually work out faster if branch prediction allows the common cases to execute quicker.

    9. KDSBest
      02-24-2013
      09:05 AM
      9

      Originally Posted by smf
      If you work on a project like this you are often bombarded with advice from people you don't know on how to do things better. While in a few rare cases they might have a point, it's just not worth taking the time to find that out. Even when an idea sounds plausible, there might be a reason why implementing it is too hard or doesn't actually work out so well in practise because of reasons you haven't considered.

      You should implement the idea yourself and submit the patch if you want someone to take notice.

      One of the points about binary search instead of switch/case statements. Sometimes the compiler will actually implement it that way, it depends on which compiler and whether it thinks it will be faster that way. It also depends on the processor, because a big set of if checks might actually work out faster if branch prediction allows the common cases to execute quicker.
      Dolphin builds a big lookup table which is even easier to implement than both and the fastest way. I work on it but this takes time to implement nothing done in some days. The lookup table is fast implemented but the recompilation is tricky.

    10. kakaroto
      02-25-2013
      10:51 PM
      10

      euhh.. don't want to disagree with anyone, but why is this even a news item? A dev says something, another says something else, and suddenly it's news ?
      Anyways, I think KDSBest is wrong, if it was a if/else if/else if/else if/.../else, then yeah, it's not performant, but a switch/case is much more performant than your binary search or whatever.
      Here's how a switch case will be implemented in assembly by the compiler (pseudo code):
      load register1, lookup_table
      load register2, register1[case_variable]
      jump register2
      with :
      lookup_table = [case1_addr, case2_addr, case3_addr, etc...]

      So how would 3 (more or less) instructions be less performant than a 'binary search' (whatever you mean by that) or by implementing a lookup table manually ?