commit | cef6e359ded8d648fc02c980b32a9f924bbff4a3 | [log] [tgz] |
---|---|---|
author | M. J. Fromberger <michael.j.fromberger@gmail.com> | Sun Jun 02 20:36:01 2019 -0700 |
committer | M. J. Fromberger <michael.j.fromberger@gmail.com> | Sun Jun 02 20:39:47 2019 -0700 |
tree | 2653538a7b913d6b294070deedeed7c00010a580 | |
parent | d8e30eaef3dd59a3c7efef8fe282eed1c62fbb9b [diff] |
Benchmark memory more realistically. Using shell.Split to benchmark produces a lot of noise from the accumulation of the results into the output slice. To get a more accurate memory profile, use the scanner directly and discard the tokens as they are processed. This allows us to (still) count the total memory allocated during the split, but does not charge it against the wrong code. This change makes the benchmark look a little bit faster, but not enough to worry about.
http://godoc.org/bitbucket.org/creachadair/shell
The shell
package implements basic shell command-line splitting.