Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMinChunk = 256
DefaultMinChunk is the fewest elements an operation will hand to a single goroutine. Below it, the cost of starting a goroutine and collecting its result outweighs the work, and fanning out further makes an operation slower rather than faster.
View Source
const ( // Fanout determines the number of children each branch will have. Fanout = 1 << FanoutBits )
View Source
const FanoutBits = 3
Variables ¶
This section is empty.
Functions ¶
func MinChunk ¶ added in v1.14.0
func MinChunk() int
MinChunk returns the current minimum chunk size, or 0 if parallelism is disabled.
func SetMinChunk ¶ added in v1.14.0
SetMinChunk sets the minimum chunk size and returns the previous one. A value below 1 disables parallelism.
Types ¶
Click to show internal directories.
Click to hide internal directories.