Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mitchellh/hashstructure
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: gohugoio/hashstructure
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 18 commits
  • 8 files changed
  • 4 contributors

Commits on Jul 30, 2024

  1. Update module path

    bep committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    6930051 View commit details
    Browse the repository at this point in the history
  2. Update GitHub test workflow

    bep committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    0599a27 View commit details
    Browse the repository at this point in the history
  3. Run gofumpt -l -w .

    bep committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    8c47e87 View commit details
    Browse the repository at this point in the history
  4. Remove the FormatV1/FormatV2 option

    This is a new fork so we can start fresh.
    bep committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    7c8cdd1 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2025

  1. Add BenchmarkMap

    bep committed Jan 12, 2025
    Configuration menu
    Copy the full SHA
    1dee3c3 View commit details
    Browse the repository at this point in the history
  2. 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)
    ```
    bep committed Jan 12, 2025
    Configuration menu
    Copy the full SHA
    d83ece6 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2025

  1. feat: respect map HashIncludeMap

    ilyam8 authored and bep committed Jan 13, 2025
    Configuration menu
    Copy the full SHA
    c72fe04 View commit details
    Browse the repository at this point in the history
  2. Add some golden test cases

    bep committed Jan 13, 2025
    Configuration menu
    Copy the full SHA
    ba7ecb6 View commit details
    Browse the repository at this point in the history
  3. github: Bump Go versions

    bep committed Jan 13, 2025
    Configuration menu
    Copy the full SHA
    669eafd View commit details
    Browse the repository at this point in the history
  4. 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)
    ````
    bep committed Jan 13, 2025
    Configuration menu
    Copy the full SHA
    18d2e7b View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2025

  1. Adjust benchmark

    bep committed Feb 5, 2025
    Configuration menu
    Copy the full SHA
    6495cb5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57e8e3b View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2025

  1. Some performance optimizations

    * Avoid creating new `reflect.Value`s for common int, uint and bool types.
    * Use `io.WriteString` to write strings. This uses `io.StringWriter` if it exists, which is  implemented by e.g. github.com/cespare/xxhash.
    
    Compared to master:
    
    ```
    goos: darwin
    goarch: arm64
    pkg: github.com/gohugoio/hashstructure
    cpu: Apple M1 Pro
                      │ cmpmaster.bench │         perf-20250205.bench         │
                      │     sec/op      │    sec/op     vs base               │
    Map-10                 1.963µ ± 17%   1.291µ ± 13%  -34.23% (p=0.002 n=6)
    String/default-10      80.90n ±  1%   84.41n ±  0%   +4.34% (p=0.002 n=6)
    String/xxhash-10       54.83n ±  1%   40.12n ±  0%  -26.82% (p=0.002 n=6)
    geomean                205.7n         163.5n        -20.52%
    
                      │ cmpmaster.bench │         perf-20250205.bench          │
                      │      B/op       │    B/op      vs base                 │
    Map-10                  573.5 ± 22%   382.0 ± 13%  -33.39% (p=0.002 n=6)
    String/default-10       56.00 ±  0%   56.00 ±  0%        ~ (p=1.000 n=6) ¹
    String/xxhash-10        48.00 ±  0%   16.00 ±  0%  -66.67% (p=0.002 n=6)
    geomean                 115.5         69.95        -39.45%
    ¹ all samples are equal
    
                      │ cmpmaster.bench │         perf-20250205.bench          │
                      │    allocs/op    │  allocs/op   vs base                 │
    Map-10                  57.50 ± 20%   37.00 ± 14%  -35.65% (p=0.002 n=6)
    String/default-10       3.000 ±  0%   3.000 ±  0%        ~ (p=1.000 n=6) ¹
    String/xxhash-10        2.000 ±  0%   1.000 ±  0%  -50.00% (p=0.002 n=6)
    geomean                 7.014         4.806        -31.48%
    ```
    
    Compared to `mitchellh/hashstructure`:
    
    ```
    goos: darwin
    goarch: arm64
    pkg: github.com/gohugoio/hashstructure
    cpu: Apple M1 Pro
                      │ cmpfork.bench │         perf-20250205.bench         │
                      │    sec/op     │    sec/op     vs base               │
    Map-10                2.789µ ± 6%   1.292µ ± 41%  -53.69% (p=0.002 n=6)
    String/default-10     83.45n ± 0%   87.36n ±  1%   +4.69% (p=0.002 n=6)
    String/xxhash-10      56.19n ± 0%   41.59n ±  1%  -25.98% (p=0.002 n=6)
    geomean               235.6n        167.4n        -28.94%
    
                      │ cmpfork.bench │         perf-20250205.bench          │
                      │     B/op      │    B/op      vs base                 │
    Map-10                1461.0 ± 6%   393.0 ± 27%  -73.10% (p=0.002 n=6)
    String/default-10      56.00 ± 0%   56.00 ±  0%        ~ (p=1.000 n=6) ¹
    String/xxhash-10       48.00 ± 0%   16.00 ±  0%  -66.67% (p=0.002 n=6)
    geomean                157.8        70.62        -55.24%
    ¹ all samples are equal
    
                      │ cmpfork.bench │         perf-20250205.bench          │
                      │   allocs/op   │  allocs/op   vs base                 │
    Map-10                 87.50 ± 9%   36.50 ± 40%  -58.29% (p=0.002 n=6)
    String/default-10      3.000 ± 0%   3.000 ±  0%        ~ (p=1.000 n=6) ¹
    String/xxhash-10       2.000 ± 0%   1.000 ±  0%  -50.00% (p=0.002 n=6)
    geomean                8.067        4.784        -40.70%
    ````
    bep committed Feb 6, 2025
    Configuration menu
    Copy the full SHA
    72666c8 View commit details
    Browse the repository at this point in the history
  2. 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%
    ```
    bep committed Feb 6, 2025
    Configuration menu
    Copy the full SHA
    25de947 View commit details
    Browse the repository at this point in the history
  3. Add support for complex64/complex128

    Support for complex64 was accidentally removed in 72666c8, complex128 is new. Now with tests.
    bep committed Feb 6, 2025
    Configuration menu
    Copy the full SHA
    bb88c16 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2025

  1. Add some more golden test cases

    bep committed Oct 9, 2025
    Configuration menu
    Copy the full SHA
    cd1b72b View commit details
    Browse the repository at this point in the history
  2. 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
    johannes94 authored Oct 9, 2025
    Configuration menu
    Copy the full SHA
    1f6d247 View commit details
    Browse the repository at this point in the history
  3. Cleanup format info from comments (#11)

    Format has been removed as an option, so removing the remaining traces
    from the codebase.
    shorsher authored Oct 9, 2025
    Configuration menu
    Copy the full SHA
    8bd92a6 View commit details
    Browse the repository at this point in the history
Loading