Golang, Performance, Programming.
height; j++ { go func() { m.Set(i, j, pixel(i, j, width, height)) w.Done() }() } } w.Wait() return m } It’s also worth mentioning that m.Set being called from different go routines is not a problem since we are modifying different positions in a preallocated slice. Finding compromise in between too