In my experience using a 512 wide movemask (to uint64_t) is the fastest on both x86 and arm64.
With rvv you don't really what to go from a vector mask to a general purpose non vector register, because the vector length may vary. But I found it really useful that vector masks are always packed into v0. So even with LMUL=8, you can just to a vmseq, switch to LMUL=1 and use vfirst & vmsbf to iterate through all indices.
In my experience using a 512 wide movemask (to uint64_t) is the fastest on both x86 and arm64.
With rvv you don't really what to go from a vector mask to a general purpose non vector register, because the vector length may vary. But I found it really useful that vector masks are always packed into v0. So even with LMUL=8, you can just to a vmseq, switch to LMUL=1 and use vfirst & vmsbf to iterate through all indices.