top | item 33340737

(no title)

LIV2 | 3 years ago

YMMV

I was excited for this because I thought it'd enable me to compile my HDL projects on my MacBook, since I'm targeting the Xilinx XC9500XL series of CPLDs this requires some an EOL design suite.

Anyway, build times are:

4 minutes with Rosetta 2

11 minutes with qemu-user-static

Whereas it only takes 20 seconds on my early 2013 MacBook Pro.

I think it would also be nice if it were possible to use this with other hypervisors. I believe it is limited to virtualization.framework so it cannot be used inside fusion for instance

discuss

order

cyberpunk|3 years ago

Is it any faster the second time around? IIRC the first time it is translating the binaries as well as running the result.

LIV2|3 years ago

Not faster the second time around, every time I run each command from the makefile it takes 1 minute before there is even any output too

I will try running things without involving docker and see if that changes anything

LIV2|3 years ago

I don't think so but I will double check tonight

runeks|3 years ago

> 4 minutes with Rosetta 2

> 11 minutes with qemu-user-static

> Whereas it only takes 20 seconds on my early 2013 MacBook Pro.

This sounds suspicious to me. In my experience, Rosetta is faster on my M1 MBP than natively on my 2015 x86 MBP.

How did you measure this?

LIV2|3 years ago

> This sounds suspicious to me. In my experience, Rosetta is faster on my M1 MBP than natively on my 2015 x86 MBP.

The performance will obviously depend on the workload

> How did you measure this?

Running the exact same docker image based on this: https://github.com/chriz2600/xilinx-ise And the code from this git repo of mine: https://github.com/LIV2/GottaGoFastRAM2000

Inside a Debian vm:

  docker run --rm -it -v ${PWD}:/build -w /build xilinx-ise /bin/bash

  cd RTL
  make clean
  time make ../Binary/XC9572XL/gottagofast2000.jed

When I get a chance I will check the timing of each individual step from the makefile.

If there is something I'm missing I'd love to know, I'd rather not have to run my builds on another machine

vbezhenar|3 years ago

Rosetta is not limited to virtualization.framework. You can easily extract rosetta binaries and emulate stuff using qemu that Apple emulates if rosetta even checks something. I'm not sure if it would be legal, but technically it should not be a big issue. Apple just made it very easy with virtualization.framework.

olliej|3 years ago

Possibly dumb question - while running are you able to inspect the page mappings? If they’re doing runtime codegen (from the Rosetta pov that’s a jit no matter what), alternatively see if it appears heavy on x87.

The former means you lose a lot of the AOT benefits and caching in Rosetta, the latter is due to Rosetta implementing x87 precisely - so a ton of software floating point.

These are the two things that to me would be most likely to cause that degree of penalty.

LIV2|3 years ago

Is there some information on how I can do that? I have no idea what I'm doing here lol