Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for benchCgoCall (0.14 sec)

  1. src/cmd/cgo/internal/test/cgo_test.go

    func TestUnsignedInt(t *testing.T)           { testUnsignedInt(t) }
    func TestZeroArgCallback(t *testing.T)       { testZeroArgCallback(t) }
    
    func BenchmarkCgoCall(b *testing.B)      { benchCgoCall(b) }
    func BenchmarkGoString(b *testing.B)     { benchGoString(b) }
    func BenchmarkCGoCallback(b *testing.B)  { benchCallback(b) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/test.go

    	}
    	C.free(unsafe.Pointer(p))
    }
    
    var (
    	cuint  = (C.uint)(0)
    	culong C.ulong
    	cchar  C.char
    )
    
    type Context struct {
    	ctx *C.struct_ibv_context
    }
    
    func benchCgoCall(b *testing.B) {
    	b.Run("add-int", func(b *testing.B) {
    		const x = C.int(2)
    		const y = C.int(3)
    
    		for i := 0; i < b.N; i++ {
    			C.add(x, y)
    		}
    	})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
Back to top