lasagne0 ← {groups {+⌿⍵}⌸ amts ×[⎕io] spices[inds;]}
where
n ← 8e5 spices ← ?6000 44⍴0 groups ← +\(16↑1 2)[?n⍴16] inds ← ?n⍴≢spices amts ← ?n⍴0
The problem with lasagne0 is space rather than time.
Diane Hymas, Performance Tuning Workshop, 2018-10-28