Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for benchCGoInCthread (0.33 sec)

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

    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/testx.go

    		t.Fatalf("sum=%d, want %d", sum.i, want)
    	}
    }
    
    // Benchmark measuring overhead from C to Go in a C thread.
    // Create a new C thread and invoke Go function repeatedly in the new C thread.
    func benchCGoInCthread(b *testing.B) {
    	n := C.callGoInCThread(C.int(b.N))
    	if int(n) != b.N {
    		b.Fatal("unmatch loop times")
    	}
    }
    
    // issue 1328
    
    //export BackIntoGo
    func BackIntoGo() {
    	x := 1
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top