Skip to content
This repository was archived by the owner on Aug 30, 2019. It is now read-only.

obfuscate: use strings.Builder from go1.10#471

Merged
gbbr merged 2 commits into
masterfrom
gbbr/go1.10
Sep 17, 2018
Merged

obfuscate: use strings.Builder from go1.10#471
gbbr merged 2 commits into
masterfrom
gbbr/go1.10

Conversation

@gbbr

@gbbr gbbr commented Sep 17, 2018

Copy link
Copy Markdown
Contributor

This change updates JSON and Redis obfuscator to use strings.Builder
instead of bytes.Buffer for a minor speed increase. It also updates CI
to use go1.10, where this new structure was added.

Additionally, it also fixes a minor bug with an error message in the config
package.

@gbbr gbbr modified the milestones: next, 6.6.0 Sep 17, 2018
@gbbr

gbbr commented Sep 17, 2018

Copy link
Copy Markdown
Contributor Author
name                      old time/op    new time/op    delta
RedisObfuscator/445b-4      8.42µs ± 0%    6.48µs ± 0%  -23.06%
RedisQuantizer-4            1.27µs ± 0%    1.23µs ± 0%   -2.92%

name                      old alloc/op   new alloc/op   delta
RedisObfuscator/445b-4      9.68kB ± 0%    3.74kB ± 0%  -61.32%
RedisQuantizer-4            1.48kB ± 0%    1.37kB ± 0%   -7.32%

name                      old allocs/op  new allocs/op  delta
RedisObfuscator/445b-4         133 ± 0%        94 ± 0%  -29.32%
RedisQuantizer-4              12.0 ± 0%      11.0 ± 0%   -8.33%

@rochdev rochdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation still mentions Go 1.9+ as the minimum version for development.

This change updates JSON and Redis obfuscator to use `strings.Builder`
instead of `bytes.Buffer` for a minor speed increase. It also updates CI
to use go1.10, where this new structure was added.
@gbbr

gbbr commented Sep 17, 2018

Copy link
Copy Markdown
Contributor Author

@rochdev 👏 excellent! Done.

@gbbr
gbbr merged commit 81ae02a into master Sep 17, 2018
@gbbr
gbbr deleted the gbbr/go1.10 branch September 17, 2018 14:29
@gbbr gbbr removed the bug label Sep 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants