68k emulation and optimizations
  • Order of the Butterfly
    Order of the Butterfly
    AmigaMancer
    Posts: 265 from 2005/8/25
    Let's say that we have 2 different versions of the same program. A 020 and a 060 version.
    Which one will run faster, under MOS? Since it emulates an 68060, is it correct to assume that the 060 version will run faster and in a more compatible way?
    Amiga 1200 user.
  • »03.11.05 - 09:36
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Chain-Q
    Posts: 347 from 2003/10/12
    From: 1 AU, EU, DE/HU
    Wrong thinking. The 68k emulator(s) in MorphOS should be considered as a different kind of 68k CPU, so it's hard to decide which one is better. Also the underlying PPC processor counts a lot. Like heavy FPU code is usually executed faster on PPC, so while heavy FPU code can be slow on a 060, it will be much faster in the emulation.

    As a general rule, an interpretive emulator should run software faster which contains less instructions. A JIT emulator is more complex though, and can recognize often used instruction schemes (like ones used by C compilers), and optimize it for the target processor.

    So it's up for testing i guess. It's just like when running code optimized for 020 or 040 on a 68060. Sometimes the 020 one is faster, sometimes the 040 one. I'm using 020+FPU versions of 68k software under MorphOS, when possible. It's because 020 supports practically all important 68k instructions, and FPU support is fast on PPC, so it usually means speedup, compared to a CPU-only version. Running the 060 version of the same software usually only means i'm avoiding a few instructions which are emulated on 060, by emulated calls, what only means slowdown in an emulator (because of more instructions to execute). Also 060 pipeline optimalizations doesn't really count under an emulator. But i not really tested it, it's just my opinion which is based on what i know (or don't know) about emulators.
    [.PegasosII/G4.:.Efika.:.Amiga2000/060.]
    [.Free Pascal Compiler MorphOS Port.]
    [.Hosting AmigaSpirit.hu.]
  • »03.11.05 - 10:21
    Profile Visit Website