Skip to content
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: google/uuid
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.2
Choose a base ref
...
head repository: google/uuid
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.0
Choose a head ref
  • 5 commits
  • 5 files changed
  • 5 contributors

Commits on Dec 30, 2020

  1. Use a custom error type for invalid lengths, replacing fmt.Errorf (#69

    )
    
    * Add benchmarks for different kinds of invalid UUIDs
    
    Also add a test case for too-short UUIDs to ensure behavior doesn’t
    change.
    
    * Use a custom error type for invalid lengths, replacing `fmt.Errorf`
    
    This significantly improves the speed of failed parses due to wrong
    lengths. Previously the `fmt.Errorf` call dominated, making this the
    most expensive error and more expensive than successfully parsing:
    
        BenchmarkParse-4                 29226529        36.1 ns/op
        BenchmarkParseBadLength-4         6923106       174 ns/op
        BenchmarkParseLen32Truncated-4   26641954        38.1 ns/op
        BenchmarkParseLen36Corrupted-4   19405598        59.5 ns/op
    
    When the formatting is not required and done on-demand, the failure per
    se is much faster:
    
        BenchmarkParse-4                 29641700        36.3 ns/op
        BenchmarkParseBadLength-4        58602537        20.0 ns/op
        BenchmarkParseLen32Truncated-4   30664791        43.6 ns/op
        BenchmarkParseLen36Corrupted-4   18882410        61.9 ns/op
    joewreschnig authored Dec 30, 2020
    Configuration menu
    Copy the full SHA
    edef28d View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2021

  1. Reduce custom error allocation (#70)

    Zero allocation by using non-pointer error.
    
    related #69
    
    name               old time/op    new time/op    delta
    ParseBadLength-16    15.4ns ± 0%     3.5ns ± 0%   ~     (p=1.000 n=1+1)
    
    name               old alloc/op   new alloc/op   delta
    ParseBadLength-16     8.00B ± 0%     0.00B        ~     (p=1.000 n=1+1)
    
    name               old allocs/op  new allocs/op  delta
    ParseBadLength-16      1.00 ± 0%      0.00        ~     (p=1.000 n=1+1)
    johejo authored Jan 4, 2021
    Configuration menu
    Copy the full SHA
    85223fa View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2021

  1. Update sql.go (#72)

    Added a single period so that the documentation doesn't look weird. Boy, I hope the tests pass.
    Steven Kaufman authored Jan 15, 2021
    Configuration menu
    Copy the full SHA
    9377784 View commit details
    Browse the repository at this point in the history
  2. hash.go hash error covered and linter error fixed (#71)

    * hash.go hash error covered and linter error fixed
    
    Error covered without change function definition
    
    * Update hash.go
    yusufpapurcu authored Jan 15, 2021
    Configuration menu
    Copy the full SHA
    b5d0d36 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2021

  1. Add NewString Func (#73)

    * added utility func
    
    * updated docs & function call
    jackterm authored Jan 22, 2021
    Configuration menu
    Copy the full SHA
    bfb86fa View commit details
    Browse the repository at this point in the history
Loading