-
hyc
So, next year's Macbook will be based on Apple's own ARM chip
-
hyc
-
selsta
randomx benchmarks will be interesting
-
sech1
hyc did you know that these days code optimizations involve _adding_ more instructions to the code?
-
sech1
I literally added one instruction to the generated RandomX code to get 1% speedup on Ryzen
-
moneromooo
What insn ?
-
moneromooo
"interrupts off" :D
-
sech1
No, "jmp $+2"
-
sech1
which is essentially a no-op
-
sech1
but it speeds up things mystically
-
moneromooo
Alignment to cache ?
-
sech1
my theory it has something to do with uOp cache
-
sech1
but I have no clue what actually happens and what it triggers inside the CPU
-
sech1
the trick doesn't work on Intel btw
-
hyc
I'd be more inclined to believe cache alignment
-
moneromooo
It's odd since if it's that easy you'd expdct the cpu to do it itself.
-
moneromooo
(if not alignment)
-
sech1
I theorized that ldmxcsr switched CPU from uOp cache to the regular x86 decoder
-
sech1
and jmp instruction was supposed to force it back to uOp cache
-
hyc
interesting
-
sech1
but I'm not sure this is what actually happens there
-
hyc
I guess there's no perf counters to expose uOp cache operation
-
moneromooo
And a 2 byte nop doesn't speed up I assume ?
-
moneromooo
(if jmp $+2 takes two bytes)
-
sech1
No, it has something to do with what jmp does
-
sech1
Because I found in the AMD optimization manual that switch between uOp cache and x86 decoder can only happen after a completed jump
-
selsta
sech1: btw I tried to compile randomx for iOS, do you know why it doesn’t recognise the ARM asm syntax in jit_compiler_a64_static.S?
-
sech1
maybe you need some special compiler options, no idea
-
selsta
first it didn’t like the `/*` style of comments and then `.global DECL(randomx_program_aarch64)` stuff
-
selsta
hmm ok
-
sech1
There are no /* comments in that file
-
asymptotically
selsta: i think the /* comments depend on if you call the assembler directly, or if you get gcc to call the assembler for you
-
sech1
ah, you compiled RandomX repo
-
sech1
xmrig's version should compile fine
-
selsta
all I did was `cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DARCH_ID=armv8-a` to create a Xcode project and then compile to my phone
-
selsta
but no idea if that should work :) will try xmrig
-
selsta
the xmrig version uses `#` for comments which Xcode also doesn’t like
-
selsta
I give up lol
-
hyc
should be using ; for asm comments
-
selsta
It wouldn’t be too interesting anyway until the ARM macbooks get released
-
tevador
that Ryzen optimization is some µarch black magic