Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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