while working on a faster auto-decoding it became oblivous that branch-prediction primitives such as the llvm_expect or builtin_expect are quite useful and should be avilable in a cross-platform compatible way.

I propose to add a new module to to druntime called core.intrinsics that would have functions like
bool likely (bool expr);
bool unlikely (bool expr);
and maybe
void prefetch(void* mem)

Please share your thoughts and tell me what other intrincic functions could/should be added.

Reply via email to