Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expand: skip brace expansion when not used
Makes expand.Fields noticeably faster, since Braces allocates quite a bit. While at it, make interp's execEnv assume that most environments are larger. For example, on my fairly minimal laptop setup, I already have about 45 environment variables. name old time/op new time/op delta Run-8 1.52ms ± 1% 1.50ms ± 1% -1.28% (p=0.002 n=6+6) name old alloc/op new alloc/op delta Run-8 185kB ± 0% 182kB ± 0% -1.76% (p=0.004 n=6+5) name old allocs/op new allocs/op delta Run-8 1.14k ± 0% 1.05k ± 0% -7.55% (p=0.002 n=6+6)
- Loading branch information