(Former Dyalog implementor) I have 9ms for the actual median calculation, which is much faster than generating the ages. It's a counting sort on 1-byte values: since the counts are so large it can just write results with memset() or an equivalent which is vectorized. You could also get the median from the counts directly, although I'm not sure APL has a way to do those counts that's faster than just sorting.