Skip to content

Tags: gohugoio/hashstructure

Tags

v0.6.0

Toggle v0.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Improve allocation performance

* improve reflect and option allocations
* optimize binary writes for numbers
* optimize string writes(#3)
* optimize object wrapping
* update go.mod to 1.20 to support unsafe string conversion

v0.5.0

Toggle v0.5.0's commit message
Add support for complex64/complex128

Support for complex64 was accidentally removed in 72666c8, complex128 is new. Now with tests.

v0.4.0

Toggle v0.4.0's commit message
Add a fast path for string inputs

```
                  │ master.bench │         perf-string.bench          │
                  │    sec/op    │   sec/op     vs base               │
String/default-10    86.98n ± 3%   77.57n ± 1%  -10.82% (p=0.002 n=6)
String/xxhash-10     40.10n ± 0%   34.82n ± 4%  -13.19% (p=0.002 n=6)
geomean              59.06n        51.97n       -12.01%

                  │ master.bench │         perf-string.bench          │
                  │     B/op     │    B/op     vs base                │
String/default-10     56.00 ± 0%   56.00 ± 0%       ~ (p=1.000 n=6) ¹
String/xxhash-10      16.00 ± 0%   16.00 ± 0%       ~ (p=1.000 n=6) ¹
geomean               29.93        29.93       +0.00%
¹ all samples are equal

                  │ master.bench │         perf-string.bench          │
                  │  allocs/op   │ allocs/op   vs base                │
String/default-10     3.000 ± 0%   3.000 ± 0%       ~ (p=1.000 n=6) ¹
String/xxhash-10      1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean               1.732        1.732       +0.00%
```

v0.3.0

Toggle v0.3.0's commit message
Use SetIterKey/SetIterValue

Compared to previous commit:

```
       │ stash.bench │        fix-setiterval.bench        │
       │   sec/op    │   sec/op     vs base               │
Map-10   3.159µ ± 1%   2.609µ ± 1%  -17.44% (p=0.002 n=6)

       │ stash.bench │       fix-setiterval.bench        │
       │    B/op     │    B/op     vs base               │
Map-10   1360.0 ± 0%   752.0 ± 0%  -44.71% (p=0.002 n=6)

       │ stash.bench │       fix-setiterval.bench        │
       │  allocs/op  │ allocs/op   vs base               │
Map-10   128.00 ± 0%   90.00 ± 0%  -29.69% (p=0.002 n=6)
```

Compared to 1dee3c3:

```
       │ 1dee3c3.bench │        fix-setiterval.bench        │
       │                     sec/op                     │   sec/op     vs base               │
Map-10                                      3.608µ ± 1%   2.537µ ± 1%  -29.68% (p=0.002 n=6)

       │ 1dee3c3.bench │       fix-setiterval.bench        │
       │                      B/op                      │    B/op     vs base               │
Map-10                                      1888.0 ± 0%   752.0 ± 0%  -60.17% (p=0.002 n=6)

       │ 1dee3c3.bench │       fix-setiterval.bench        │
       │                   allocs/op                    │ allocs/op   vs base               │
Map-10                                      130.00 ± 0%   90.00 ± 0%  -30.77% (p=0.002 n=6)
````

v0.2.0

Toggle v0.2.0's commit message
Use MapRange() to iterate maps

```
       │ master.bench │         fix-mapkeys.bench          │
       │    sec/op    │   sec/op     vs base               │
Map-10    3.598µ ± 1%   3.058µ ± 0%  -15.00% (p=0.002 n=6)

       │ master.bench │          fix-mapkeys.bench          │
       │     B/op     │     B/op      vs base               │
Map-10   1.844Ki ± 0%   1.328Ki ± 0%  -27.97% (p=0.002 n=6)

       │ master.bench │        fix-mapkeys.bench         │
       │  allocs/op   │ allocs/op   vs base              │
Map-10     130.0 ± 0%   128.0 ± 0%  -1.54% (p=0.002 n=6)
```

v0.1.0

Toggle v0.1.0's commit message
Remove the FormatV1/FormatV2 option

This is a new fork so we can start fresh.