This makes rm -rf significantly faster (400-500%) in some pathological
cases, and slightly slower (20%) in at least one pathological case.
- rm -r deletes deep hierarchies more efficiently. Before, it took O(N^2)
- time, now it takes O(N), where N is the depth of the hierarchy. However,
- this improvement is not as pronounced as might be expected for very
- deep trees, because prior to this change, for any relative name length
- longer than 8KiB, rm -r would sacrifice official conformance to avoid the
- disproportionate O(N^2) performance penalty. Leading to another improvement:
+ rm -r deletes deep hierarchies more efficiently. Before, execution time
+ was quadratic in the depth of the hierarchy, now it is merely linear.
+ However, this improvement is not as pronounced as might be expected for
+ very deep trees, because prior to this change, for any relative name
+ length longer than 8KiB, rm -r would sacrifice official conformance to
+ avoid the disproportionate quadratic performance penalty. Leading to
+ another improvement:
rm -r is now slightly more standards-conformant when operating on
write-protected files with relative names longer than 8KiB.