Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/bytes/bytes.go

    	// the result length is large (roughly, over L2 cache size).
    	const chunkLimit = 8 * 1024
    	chunkMax := n
    	if chunkMax > chunkLimit {
    		chunkMax = chunkLimit / len(b) * len(b)
    		if chunkMax == 0 {
    			chunkMax = len(b)
    		}
    	}
    	nb := bytealg.MakeNoZero(n)[:n:n]
    	bp := copy(nb, b)
    	for bp < n {
    		chunk := min(bp, chunkMax)
    		bp += copy(nb[bp:], nb[:chunk])
    	}
    	return nb
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Sep 03 20:55:15 UTC 2024
    - 35.6K bytes
    - Viewed (0)
Back to top