mirror of
https://github.com/burrowers/garble.git
synced 2026-04-22 15:47:04 +08:00
8652271db2
Obfuscating the runtime only needs to list the linknamed packages, and doesn't need to know about their dependencies directly. Refactor the script to return a "flat" list that includes all packages we need, except those that we know the runtime already pulled in. This allows us to simplify the script and avoid passing -deps to cmd/go. Performance is unaffected, but I reckon it's worthwhile given how much we simplified the script. Longer term, it's also best to avoid using -deps when we don't need it, as cmd/go could avoid computing information we don't need. name old time/op new time/op delta Build/NoCache-16 1.68s ± 1% 1.68s ± 0% ~ (p=1.000 n=5+5) name old bin-B new bin-B delta Build/NoCache-16 6.72M ± 0% 6.72M ± 0% +0.01% (p=0.008 n=5+5) name old sys-time/op new sys-time/op delta Build/NoCache-16 1.88s ± 1% 1.89s ± 2% ~ (p=0.548 n=5+5) name old user-time/op new user-time/op delta Build/NoCache-16 19.9s ± 1% 19.8s ± 0% ~ (p=0.421 n=5+5)