Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for concatNaive (0.04 sec)

  1. cmd/object-api-utils_test.go

    		}
    	}
    	return path.Join(elem...) + trailingSlash
    }
    
    func concatNaive(ss ...string) string {
    	rs := ss[0]
    	for i := 1; i < len(ss); i++ {
    		rs += ss[i]
    	}
    	return rs
    }
    
    func benchmark(b *testing.B, data []string) {
    	b.Run("concat naive", func(b *testing.B) {
    		b.ResetTimer()
    		b.ReportAllocs()
    		for b.Loop() {
    			concatNaive(data...)
    		}
    	})
    	b.Run("concat fast", func(b *testing.B) {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 24.1K bytes
    - Viewed (0)
Back to top