@keylimesoda@robertgraham Ofc it is async, because it would be slow the other way (and if you want sync you have lock and atomic, but instead of c++ it is a bit more work)
So yeah C is almost an easier ASM, and the CPU work around it pretty much (AVX512 reg from 16 to 31 are slow because asm doesnt
@eeuoss Is ASM enought low level or not ? Yes C and C++ abstract clobber/flag, loops, if statement, and struct the rest is pretty much the same. You use the same OS function, same ptr, same allocation, and the kernel is not that simple to talk to. And ASM (and so C) does talk to hardware
@can1357 But more seriously here is an example of with and without AVX512 (I have a CPUFeatures::has_vaes512() that I hardcoded as false) (I should push in github one day in github as I write with __asm__ volatile now)
@can1357 But I found out one peculiar thing is that the registers 16 to 31 are extremely slow, to the point where I prefer spilling on the stack then move it back just to not use them as they are really slow (compared to 0 to 16). But AVX512 are a bit better in debit (even on one lane)
@can1357 I am pretty sure that a AVX512 (aes-ni) on a single lane (i5 11300H) is as quick as a 2 lane AVX2 (difference in the tens or hundreds of Mo with more that 20 Gbi/s debit). I don't know if on better hardware there is some changes or if vaes is different but still not sure ab it
Do you think a video on AES (mainly ECB and CTR as GCM needs a lot more time of explaining) in C++ with SIMD instruction is interesting. It will focus probably a lot on optimisation and issue and known vulnerabilities