{m:(x,x)#til x*x; r:til[x]-x div 2; 2(flip r rotate')/m}
generates magic squares of odd size, and the method is much clearer. This isn't even golfed as the variables have been left. ]runtime -repeat=1s 'v←k1 ⋄ v⌿⍨←v≠2'
\* Benchmarking "v←k1 ⋄ v⌿⍨←v≠2", repeat=1s
┌──────────┬──────────────┐
│ │(ms) │
├──────────┼──────────────┤
│CPU (avg):│0.008491847826│
├──────────┼──────────────┤
│Elapsed: │0.008466372283│
└──────────┴──────────────┘
]runtime -repeat=1s 'v←k2 ⋄ v⌿⍨←v≠2'
\* Benchmarking "v←k2 ⋄ v⌿⍨←v≠2", repeat=1s
┌──────────┬────────────┐
│ │(ms) │
├──────────┼────────────┤
│CPU (avg):│0.8333333333│
├──────────┼────────────┤
│Elapsed: │0.83 │
└──────────┴────────────┘