diff options
| author | 2025-08-21 16:41:50 +0200 | |
|---|---|---|
| committer | 2025-08-21 16:41:50 +0200 | |
| commit | a79f83cbded3fb1165b338ce316dc9f2217467ff (patch) | |
| tree | 4b4a2b7084aced51c0a691cee6352b4ecae90df8 /vendor/codeberg.org/gruf/go-mangler/v2/README.md | |
| parent | [chore] bump golangci-lint version in CI, disable var-naming package name che... (diff) | |
| download | gotosocial-a79f83cbded3fb1165b338ce316dc9f2217467ff.tar.xz | |
[chore] update dependencies (#4386)
- codeberg.org/gruf/go-bytesize v1.0.3 -> v1.0.4
- codeberg.org/gruf/go-kv/v2 v2.0.6 -> v2.0.7
- codeberg.org/gruf/go-mutexes v1.5.2 -> v1.5.3
- codeberg.org/gruf/go-structr v0.9.7 -> v0.9.8
- codeberg.org/gruf/go-ffmpreg v0.6.8 -> v0.6.9
- github.com/tomnomnom/linkheader HEAD@2018 -> HEAD@2025
all of the above codeberg.org/gruf updates are in preparation for Go1.25, except for bytesize, and also ffmpreg which is a rebuild with the latest version of ffmpeg (v5.1.7)
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4386
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/codeberg.org/gruf/go-mangler/v2/README.md')
| -rw-r--r-- | vendor/codeberg.org/gruf/go-mangler/v2/README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-mangler/v2/README.md b/vendor/codeberg.org/gruf/go-mangler/v2/README.md new file mode 100644 index 000000000..636c2494c --- /dev/null +++ b/vendor/codeberg.org/gruf/go-mangler/v2/README.md @@ -0,0 +1,31 @@ +# go-mangler + +[Documentation](https://pkg.go.dev/codeberg.org/gruf/go-mangler). + +To put it simply is a bit of an odd library. It aims to provide incredibly fast, unique string outputs for all default supported input data types during a given runtime instance. See `mangler.String()`for supported types. + +It is useful, for example, for use as part of larger abstractions involving hashmaps. That was my particular usecase anyways... + +This package does make liberal use of the "unsafe" package. + +Benchmarks are below. Please note the more important thing to notice here is the relative difference in benchmark scores, the actual `ns/op`,`B/op`,`allocs/op` accounts for running through ~80 possible test cases, including some not-ideal situations. + +The choice of libraries in the benchmark are just a selection of libraries that could be used in a similar manner to this one, i.e. serializing in some manner. + +``` +go test -run=none -benchmem -gcflags=all='-l=4' -bench=.* +goos: linux +goarch: amd64 +pkg: codeberg.org/gruf/go-mangler +cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz +BenchmarkMangle-8 1278526 966.0 ns/op 0 B/op 0 allocs/op +BenchmarkMangleKnown-8 3443587 345.9 ns/op 0 B/op 0 allocs/op +BenchmarkJSON-8 228962 4717 ns/op 1849 B/op 99 allocs/op +BenchmarkLoosy-8 307194 3447 ns/op 776 B/op 65 allocs/op +BenchmarkFmt-8 150254 7405 ns/op 1377 B/op 143 allocs/op +BenchmarkFxmackerCbor-8 364411 3037 ns/op 1224 B/op 105 allocs/op +BenchmarkMitchellhHashStructure-8 102272 11268 ns/op 8996 B/op 1000 allocs/op +BenchmarkCnfStructhash-8 6789 168703 ns/op 288301 B/op 5779 allocs/op +PASS +ok codeberg.org/gruf/go-mangler 11.715s +``` |
