in reply to Re: 'ls -C' column style (sideways)
in thread 'ls -C' column style
This one loops over the list of items once (at most).
Intriguing. Both your original version and the updated one do much better than mine at small widths (25), but then get progressively worse, where mine gets better.
I haven't read through your algorithm properly yet, but we do get the same results (except I used 2 spaces not 1 between the columns).
[22:49:46.54] P:\test>405274 >nul 100 trials of Buk:25 ( 190.051ms total), 1.901ms/trial 100 trials of Buk:50 ( 113.853ms total), 1.139ms/trial 100 trials of Buk:75 ( 88.451ms total), 884us/trial 100 trials of Buk:100 ( 70.376ms total), 703us/trial 100 trials of Buk:125 ( 38.077ms total), 380us/trial 100 trials of Buk:150 ( 46.875ms total), 468us/trial 100 trials of Buk:175 ( 46.875ms total), 468us/trial 100 trials of Buk:200 ( 46.875ms total), 468us/trial [22:50:02.71] P:\test>405274-tye1 >nul 100 trials of Tye1:25 ( 93.742ms total), 937us/trial 100 trials of Tye1:50 ( 190.402ms total), 1.904ms/trial 100 trials of Tye1:75 ( 265.551ms total), 2.656ms/trial 100 trials of Tye1:100 ( 343.750ms total), 3.438ms/tria +l 100 trials of Tye1:125 ( 421.875ms total), 4.219ms/tria +l 100 trials of Tye1:150 ( 453.125ms total), 4.531ms/tria +l 100 trials of Tye1:175 ( 468.750ms total), 4.688ms/tria +l 100 trials of Tye1:200 ( 484.375ms total), 4.844ms/tria +l [22:50:08.43] P:\test>405274-tye2 >nul 100 trials of Tye2:25 ( 107.743ms total), 1.077ms/trial 100 trials of Tye2:50 ( 154.991ms total), 1.550ms/trial 100 trials of Tye2:75 ( 200.225ms total), 2.002ms/trial 100 trials of Tye2:100 ( 227.510ms total), 2.275ms/tria +l 100 trials of Tye2:125 ( 250ms total), 2.500ms/tria +l 100 trials of Tye2:150 ( 234.375ms total), 2.344ms/tria +l 100 trials of Tye2:175 ( 234.375ms total), 2.344ms/tria +l 100 trials of Tye2:200 ( 250ms total), 2.500ms/tria +l
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: 'ls -C' column style (sideways)
by tye (Sage) on Nov 05, 2004 at 01:10 UTC | |
by BrowserUk (Patriarch) on Nov 05, 2004 at 02:33 UTC | |
|
Re^3: 'ls -C' column style (sideways)
by hv (Prior) on Nov 05, 2004 at 11:45 UTC |