({⍵×1 0 1}⍤0) 0 1 0 0 0 1 0 1
The rank mapping uses the same array every iteration. What if we pulled it out?
0 1 ({⍺×⍵}⍤0 1) 1 0 1 0 0 0 1 0 1
0 1 ∘.× 1 0 1 0 0 0 1 0 1
{ , ⍵ ∘.× 1 0 1 }⍣3⊢ 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1