Elijah Newren <newren@xxxxxxxxx> writes: > On Tue, Jul 13, 2021 at 10:10 AM Jeff Hostetler <git@xxxxxxxxxxxxxxxxx> wrote: >> >> a quick test on my Windows machine shows that >> >> test_seq 1 10000 | xargs touch >> >> takes 3.1 seconds. >> >> just a simple >> >> test_seq 1 10000 >/dev/null >> >> take 0.2 seconds. >> >> using my test-tool helper cuts that time in half. > > Yeah, test_seq is pretty bad; it's just a loop in shell. Is there a > 'seq' on windows, and does using it instead of test_seq make things > faster with Ævar's suggested command? Unless I am misreading Jeff's message, I do not think that makes sense. Counting to 10000 in shell loop is trivial (0.2 seconds), but letting touch invoked 10000 times to create (or smudge mtime of, but I suspect that is not what is going on here) 10000 files takes 3.1 seconds, and of course a native binary that creates 10000 files with a single invocation would be faster. > I'd really like to modify test_seq to use seq when it's available and > fall back to the looping-in-shell when we need to for various > platforms. So, if I am reading Jeff correctly, that optimizes something that is not a bottleneck. > Maybe it'd even make sense to write a 'test-tool seq' and make > test_seq use that just so we can rip out that super lame shell > looping.