I was asking a few weeks ago about Clojure on Apple Silicon; I got a few responses, and now having bought one (my wife’s, actually) I can say that under Rosetta things, uh, just work.
Performance wise, I got almost parity between a low-tier Air with 8gb of memory and a dual core i5 @ 3.3ghz with 16gb. For our codebase, intel Mac takes 51s to start the server vs 68 on Apple Silicon, but compiling our front end is 67s (intel) vs 55s (arm).
This is stock Mac adopt openjdk build under Rosetta.
@orestis What does it look like to run something "under Rosetta" - does this happen automatically?
Do native programs installed via brew (e.g. clj-kondo) "just work" in the terminal?
So, for fun I tried cli-kondo using the azul native jdk. Classpath cache warmup is 5 seconds and actual source linting is a bit below 2.
I’m using Homebrew (Rosetta translated), and bb works out of the box.
You don’t know is under Rosetta unless you open activity monitor.
have you tried the Azul jvm for non-rosetta?
From the terminal, you can force Rosetta using arch
@alexmiller it’s on my list
seen some pretty impressive comparisons with that
I downloaded bb and clj-kondo from GitHub and they just work, after the necessary security stuff
Modest perf improvements in kondo, even under Rosetta; classpath warmup went from 10 to 8 seconds, source lint from 2.5 to 2
nice!
Btw the general UI performance improvements are really big. I’ve tried opening a couple of hundred of mostly scanned PDFs which is my wife’s workload and after only a few seconds of beach ball everything was back to snappy. All this on a machine with no fan and at a pretty low price (less than half of my comparison machine). Pretty impressive.
Does graal native-image cross compile? Or you need access to an Mac arm machine?
No cross-compilation unfortunately.
This machine needs to go back (ordered the wrong keyboard, gah) but once the new one comes in (after the holidays) I’ll offer to try to build a native binary using graal. I’m not sure they even have something out?
Not yet, they're working on it
I think they're waiting for OpenJDK to support it first
I wish Apple upped the memory specs a bit, at least 64GB like they do now with the old macbook pro
i've ordered a macbook air with m1 for my wife as well (seems enough for her use cases). as for myself, i'm torn between the current macbook pro with m1 and a higher-end macbook pro with an alleged m1x that's to be released next year. 😆
Rumors say that much beefier machines are on the way so hopefully they will cater to this use case.
I’m holding out for one that can drive two screens and has more than two Thunderbolt ports and all that. Hopefully by the time that’s released, the software that I use will be running natively as well.