WOA X64 emulator for ARM

19

What is going on with X64 emulation for ARM? In the wake of WWDC WOA needs x64 support. Is anyone hearing anything regarding that?

At the same time 32bit emulation perf needs to be improved as well. I am hoping Microsoft is actively working on this.

Comments (19)

19 responses to “WOA X64 emulator for ARM”

  1. alsorun

    Unfortunately, the ARM chip in Surface Pro X is already a weaker chip than most Intel/AMD chips. So emulation does not help much. The only way is to have native apps.


    Microsoft can sell Surface Pro X as limited scope laptop. But the price has to come down by $300.

    • kitron

      In reply to alsorun:

      It is almost on par with the i5 at least based on geekbench. Emulation helps because until native support for most used apps arrives it can be a bridge.



      • alsorun

        In reply to kitron:

        Geekbench 5.0 (CPU) (Higher is better) from WC


        Surface Pro XSQ single core=725, multicore= 2,819
        Surface Pro 7i5-1035G4 single core=1,191, multicore =4,441

        Differ substantially


        • Daishi

          In reply to alsorun:

          The problem with that of course being that, to the best of my knowledge, Geekbench for Windows is an x86 program and therefore is being run in emulation on ARM. So the results from the benchmark aren’t necessarily an accurate representation of the relative power of the hardware.

        • kitron

          In reply to alsorun:

          You are right, I was comparing previous gen Intel. Still it is quite interesting to see how much progress Apple has made with their chips that now almost rival laptop processors. I hope MS does not stop at SQ1 and keeps pushing the ARM line of Surface Pro. Hopefully there is an SQ2 or something along those lines in the near future.


          Until they get devs to recompile or build for ARM they need to make sure these devices are usable as in all Apps work so x64 emulation needs to happen.

      • Paul Thurrott

        In reply to kitron:

        Benchmarks aren't real life. Suspect that whenever x64 emulation does arrive, it will require a chipset that doesn't exist yet today, or will at least be terrible on current chipsets.

        • kitron

          In reply to paul-thurrott:
          Sure the benchmarks don't tell the whole story but to at least we have some idea how SQ1 compares to Apple's A12Z (A12Z seems to be about 50% faster).
          From what was demoed at WWDC Apple's Rosetta 2 performed quite well so yeah MS needs new chips to have parity and emulation needs to be solid as well.

          The question is how much does MS care to get this done properly.


          • john_m

            In reply to kitron:


            In some cases Rosetta 2 will perform much better than any WOA x86 emulation because of Apple Bitcode that they started using in 2015. Basically apps in the appstore can be compiled (and for Apple Watch/Apple TV are required) into an intermediate non-machine code byte code. This code is then converted to the appropriate machine code for the CPU you are using during install.


            When they swapped from 32 bit to 64 bit in their Apple Watches it was seemless since the apps were already in bitcode. It's been optional in iOS/iPadOS apps but when it's used Rosetta 2 just has to do a one time translation (the other half of the LLVM compiler) and you get a native app on the new Apple Silicon. I'm curious what percentage of apps in the app store are already using bitcode.

  2. kitron

    I tried to find more about x64 emulation and so far no luck but here are some posts on the current 32bit implementation


    https://channel9.msdn.com/Events/Build/2017/P4171

    https://wbenny.github.io/2018/11/04/wow64-internals.html

    https://threatvector.cylance.com/en_us/home/teardown-windows-10-on-arm-x86-emulation.html

    https://docs.microsoft.com/en-us/windows/uwp/porting/apps-on-arm

  3. wright_is

    Emulation is only ever a crutch. What is needed is for developers to start releasing native ARM binaries.

    • Daishi

      In reply to wright_is:

      So, genuine question, what is running apps in containers? And, if containers are also a crutch, what does that mean for 10X?

      • wright_is

        In reply to Daishi:

        A container is a way of isolating code from interfering with other programs or the core OS. It is like Sandboxing on a bigger scale, the code is, generally, processor native. A sort of thin virtualization.

        Emulation is taking instructions for one processor type and converting them on the fly to run on a different processor architecture.

        In Windows 10X case, it is isolating the apps from each other and from the OS, but everything is x86(_64) code. The "old Windows" container holds all the "Win32" cruft that is insecure and not really needed for a "modern" OS. Code running in the container can't, theoretically, corrupt the main system. So you keep a slim, modern core and ban all the old cruft into the container.

        It is like comparing a container truck with a translator working at the UN. ;-)

        • sibrowne

          In reply to wright_is:

          I wonder if Apple is getting a performance advantage by not using 'on-the-fly' emulation.


          Apple has said that Rosetta 2 translates Intel instructions to Apple Silicon instructions at installation-time, so after installation, no Intel code exists on the device, only 'native' AS code, albeit pre-translated.


          WOA uses a dynamic binary translator, which looks at blocks of Intel code and at runtime, translates them to blocks of ARM64 code, which it caches in memory or on disk for subsequent use.


          I would imagine that the Apple approach would lead to slower installation, but faster runtime, whereas WOA would have faster installs, but slower runtime, until it has cached all of the translated code.


          • wright_is

            In reply to SiBrowne:

            I suspect you are correct. The question is how reliable that is, with code obfuscation techniques etc. that dynamically change code on the fly. That would cause problems on Windows, but is probably something Apple could easily say "you own fault, tough".

      • sibrowne

        In reply to Daishi:


        Traditionally on Windows, 'badly-behaved' apps could install all sorts of stuff directly into the registry and file system and when uninstalling those apps, this stuff would be left behind, cluttering-up the system, until you manually go in and clean it up yourself or reinstall Windows.


        In Windows 10X, containers provide a way for Windows to isolate an application, so that the application thinks that it is making changes to the registry and file system, but really it's not. The changes are held within the container. Then, when you come to uninstall the application, Windows can remove the whole container and everything associated with the application is removed from the system. Containers help prevent the build up of leftover rubbish in the file system and registry.


        This is a somewhat simplified explanation, but I think it mostly covers what containers do on 10X.


  4. kitron

    Game developer ports x86 game to ARM just to compare benchmark performance.


    https://megayuchi.com/2019/12/08/surface-pro-x-benchmark-from-the-programmers-point-of-view/


    His conclusion:

    "

    1. "In general CPU operations – arithmetic, reading from and writing to memory, the ARM64 performance of the SQ1 processor is satisfactory.
    2. When using spin lock, performance is significantly lower than intel x86. Also when it in a bad situation with multithreading, such as using Critical Sections, performance is significantly lower than x86.
    3. It’s still slower than intel x86. In addition to the clock frequency, instruction efficiency is still lower than Intel x86.
    4. But that’s enough to use as a laptop (assuming it running apps for ARM64). CPU performance is not severely degraded compared to Intel x86. Sometimes it’s better than x86. GPU performance in particular is impressive.
    5. At the moment, there are problems with Qualcomm’s GPU drivers. Both performance and stability are a problem with DirectX.
    6. If popular productivity applications are released for ARM64, I think it can provide a working environment that is not lacking compared to x86 devices.
    7. If the GPU driver improves, I think the game that runs on the x86 Surface Pro can run smoothly.
    8. x86 emulation performance is significantly lower than that of native ARM64. If the Windows on ARM ecosystem has to rely on x86 emulation, there is no future.

    "


    The last point on emulation is scary. It looks like Microsoft has a lot more work to do.


    • wright_is

      In reply to kitron:

      Scary, but realistic. Emulated performance is always going to be disappointing, compared to having native code. Without native code, there is little real point in investing in an WoA device.