-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slightly reduce the range of hashed name lengths
v0.8.0 was improved to obfuscate names so that they didn't all end up with the same length. We went from a length fixed to 8 to a range between 8 and 15. Since the new mechanism chooses a length evenly between 8 and 15, the average hashed name length went from 8 to 11.5. While this improved obfuscation, it also increased the size of obfuscated binaries by quite a bit. We do need to use a reasonably large length to avoid collisions within packages, but we also don't want it to be large enough to cause too much bloat. Reduce the minimum and maximum from 8 and 15 to 6 and 12. This means that the average goes fro 11.5 to 9, much closer to the old average. We could consider a range of 4 to 12, but 4 bytes is short enough where collisions become likely in practice, even if it's just the minimum. And a range of 6 to 10 shrinks the range a bit too much. name old time/op new time/op delta Build-16 20.6s ± 0% 20.6s ± 0% ~ (p=0.421 n=5+5) name old bin-B new bin-B delta Build-16 5.77M ± 0% 5.66M ± 0% -1.92% (p=0.008 n=5+5) name old cached-time/op new cached-time/op delta Build-16 705ms ± 4% 703ms ± 2% ~ (p=0.690 n=5+5) name old mallocs/op new mallocs/op delta Build-16 25.0M ± 0% 25.0M ± 0% -0.08% (p=0.008 n=5+5) name old sys-time/op new sys-time/op delta Build-16 8.11s ± 2% 8.11s ± 2% ~ (p=0.841 n=5+5) Updates #618.
- Loading branch information
Showing
2 changed files
with
48 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters