3 ms·
I suspect normal laptop with QEMU would run RISC-V code faster.
by rasz 11mo ago
I suspect normal laptop with QEMU would run RISC-V code faster.
- brucehoult 11mo agoNo, not on a laptop with anything like a comparable number of cores. Any x86 or Apple Silicon laptop that can match the DC-ROMA II in QEMU will need around three times as many cores -- if the task even scales to that many cores -- and will cost a lot more. I tried compiling GCC 13 on my i9-13900HX laptop with 24 cores, and on Milk-V Megrez which is the same chip but only one of them (4 cores, not 8): on Megrez: real 260m14.453s user 872m5.662s sys 32m13.826s On docker/QEMU on i9: real 209m15.492s user 2848m3.082s sys 29m29.787s Only just 25% faster on the x86 laptop. Compared to an 8 core RISC-V it would be slower. And 3.2x more CPU time on the x86 with QEMU than on the RISC-V natively, so you'd need that many more "performance" cores than the either this RISC-V laptop has RISC-V. Or build Linux kernel 7503345ac5f5 (almost exactly a year old at this point) using RISC-V defconfig: i9-13900HX docker/qemu real 19m12.787s user 583m44.139s sys 10m3.000s Ryzen 5 4500U laptop docker/qemu (Zen2 6 cores, Win11) real 143m20.069s user 820m26.988s sys 24m33.945s Mac Mini M1 docker/qemu (4P + 4E cores) real 69m16.520s user 531m47.874s sys 12m28.567s VisionFive 2 (4x U74 in-order cores @1.5 GHz, similar to RPi 3) real 67m35.189s user 249m55.469s sys 13m35.877s Milk-V Megrez (4x P550 cores @1.8 GHz) real 42m12.414s user 149m5.034s sys 11m33.624s The cheap (~$50) VisionFive 2 is the same speed as an M1 Mac with qemu, or twice as fast as the 6 core Zen 2). The 4 core Megrez takes around twice as long as the 24 core i9 with qemu. Eight of the same cores in the DC-Roma II will match the 24 core i9 and be more than three times faster than the 8 core M1 Mac.