I didn't write it this way for performance reasons. But this technique should have good performance when sorting items across instead of down.
You can also make it faster with a bit of complication by teaching it to consider about 2N^.5 column counts rather than about N/2 of them.
- tye
In reply to Re^3: 'ls -C' column style (sideways)
by tye
in thread 'ls -C' column style
by hv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |