Re: Is there a better/nicer way?
Posted: Sun Mar 28, 2021 4:38 pm
If that @ wasn't so slow...
But nevertheless, mission accomplished: seemingly there wasn't any new ingenious way to solve the initial problem (which was part of the module for finding typos in a very long list of cd tracks).
-wm
⍝
rot_wm4←{⍺←2 ⋄ ⍺>≢⍵:⊂⍵ ⋄ ↓n r⍴(∊(-⍺),/⍵)@(,((1+r)ׯ1+⍳n)∘.+⍳⍺)⊢(r×n←1-⍺-r←≢⍵)⍴⍵}
]runtime -c "5 rot_wm4 333⍴⎕A" "5 rot_mk2 333⍴⎕A"
5 rot_wm4 333⍴⎕A → 8.6E¯5 | 0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
5 rot_mk2 333⍴⎕A → 6.3E¯5 | -27% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
But nevertheless, mission accomplished: seemingly there wasn't any new ingenious way to solve the initial problem (which was part of the module for finding typos in a very long list of cd tracks).
-wm