Use declarative attribute macros instead of procedural macros for better compile times
Currently, we use 2 procedural macros, assert_instr and simd_test, for testing. It is convenient, but the problem is that it significantly slows down compilation. Seeing that these macros are pretty small, I thought of using declarative attribute macros (rust-lang/rust#143547) instead
The diffcount is huge due to all uses of simd_test being changed, like
#[simd_test(enable = "avx,gfni")]
got changed to
#[simd_test("avx", "gfni")]
The reason being that we cannot do string splitting etc in declarative macros
The reason being that we cannot do string splitting etc in declarative macros
Wouldn't a split at runtime work fine here?
No, we need to pass the target features to the std::arch detection macros, and they only accept literals
for some reason this is actually a little bit slower on my pc. Does anyone know what's going on? I thought proc-macros are supposed to be slower than decl macros in general