I used the same logic from this showcase, main branch which is on 0.15.2 and 0.16-mixed which uses the same recursion that calls processing functions and I get this result when benchmarking:
Only difference logical difference in the code is this:
0.15.2
for (processed_args.items[0 .. processed_args.items.len - 1]) |arg| {
var open = std.fs.cwd().openDir(
arg,
.{ .no_follow = true },
) catch |err| {
std.log.err("{s}: {s}\n", .{ @errorName(err), arg });
continue;
};
defer open.close();
const src_path = open.stat() catch |err| {
std.log.err("{s}: {s}\n", .{ @errorName(err), arg });
continue;
};
0.16.-mixed:
for (processed_args.items[0 .. processed_args.items.len - 1]) |arg| {
var src_path = std.Io.Dir.cwd().statFile(
io,
arg,
.{ .follow_symlinks = false },
) catch |err| {
std.log.err("{s}: {s}\n", .{ @errorName(err), arg });
continue;
};
I know, I should figure out how to stat files with out going through symlinks on 0.15.2 instead, but does that really impact the performance this much?
