diff options
author | Fabricio Voznika <fvoznika@google.com> | 2020-12-15 12:21:47 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-15 12:23:55 -0800 |
commit | 12ac31ed04dadf76d158cb07b8bc4f4a2b6d4895 (patch) | |
tree | ce1589c20ac6b1e3aae6c360e6cdf2b8571c4d8c /pkg/sentry/hostcpu | |
parent | 5843a5007c79268ba9913a8e0dd3ec998a741d11 (diff) |
fsgofer optimizations
- Skip chown call in case owner change is not needed
- Skip filepath.Clean() calls when joining paths
- Pass unix.Stat_t by value to reduce runtime.duffcopy calls.
This change allows for better inlining in localFile.walk().
Change Baseline Improvement
BenchmarkWalkOne-6 2912 ns/op 3082 ns/op 5.5%
BenchmarkCreate-6 15915 ns/op 19126 ns/op 16.8%
BenchmarkCreateDiffOwner-6 18795 ns/op 19741 ns/op 4.8%
PiperOrigin-RevId: 347667833
Diffstat (limited to 'pkg/sentry/hostcpu')
0 files changed, 0 insertions, 0 deletions