Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkBitToggle (0.21 sec)

  1. src/cmd/compile/internal/test/bench_test.go

    }
    
    func BenchmarkBitClear(b *testing.B) {
    	const N = 64 * 8
    	a := make([]uint64, N/64)
    	for i := 0; i < b.N; i++ {
    		for j := uint64(0); j < N; j++ {
    			a[j/64] &^= 1 << (j % 64)
    		}
    	}
    }
    
    func BenchmarkBitToggle(b *testing.B) {
    	const N = 64 * 8
    	a := make([]uint64, N/64)
    	for i := 0; i < b.N; i++ {
    		for j := uint64(0); j < N; j++ {
    			a[j/64] ^= 1 << (j % 64)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 08 03:27:59 UTC 2021
    - 2.1K bytes
    - Viewed (0)
Back to top