Skip to content

Instantly share code, notes, and snippets.

@RomanSaveljev
Last active September 22, 2015 21:10

Revisions

  1. Roman Savelyev revised this gist Sep 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gofmt-issue.go
    Original file line number Original file line Diff line number Diff line change
    @@ -8,6 +8,6 @@ func BenchmarkSearchByRolling(b *testing.B) {


    func BenchmarkSearchInArray(b *testing.B) { func BenchmarkSearchInArray(b *testing.B) {
    for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
    sort.SearchInts(arr, i & maxKeys) sort.SearchInts(arr, i&maxKeys)
    } }
    } }
  2. Roman Savelyev created this gist Sep 22, 2015.
    13 changes: 13 additions & 0 deletions gofmt-issue.go
    Original file line number Original file line Diff line number Diff line change
    @@ -0,0 +1,13 @@
    package gofmt_bug

    func BenchmarkSearchByRolling(b *testing.B) {
    for i := 0; i < b.N; i++ {
    sigs.Get(uint32(i & maxKeys))
    }
    }

    func BenchmarkSearchInArray(b *testing.B) {
    for i := 0; i < b.N; i++ {
    sort.SearchInts(arr, i & maxKeys)
    }
    }