On Mon, Oct 17, 2022 at 06:50:06PM +0200, Ævar Arnfjörð Bjarmason wrote: > Sorry about the slowdown, the removal of "list" was just an in-between > step to migrating "submodule" to a full built-in. > > I can't reproduce anything like the 8ms v.s. ~600ms difference you note > here, but for me migrating it to a built-in is around 10% slower with > "foreach" than the old "list". I wonder what results you get? I don't think "foreach" can ever be as performant as a bare "list". It inherently is going to do O(n) fork+execs. So it's OK if you have one or two submodules, but not if you have hundreds. If it treated "echo" as a builtin and served it in-process, it could avoid that extra overhead. But there are so many corner cases there, you'd probably do better to add "list --format" instead. -Peff