Go的sync.pool可以用于数组/切片吗?

I'm wondering if it's possible use sync.Pool with an array or slice? For example, could sync.Pool speed up the following when handling tens-of-thousands of requests per second? The example is simply understanding Go better.

// Handler that uses GenerateArray
func ok(w http.ResponseWriter, r *http.Request) {
    var res [100000]uint64
    fibonacci.GenerateArray(&res)
    fmt.Fprintf(w, "OK")
}

func GenerateArray(data *[100000]uint64) {
    var start uint16 = 1000
    var counter uint32
    for start >= 1 {
        var num = 90
        var n1, n2, temp uint64 = 0, 1, 0

        for num >= 1 {
            temp = n2
            n1, n2 = temp, n1+n2
            data[counter] = n2
            counter++
            num--
        }
        start--
    }
}

EDIT: This is the slice version as suggested by Icza. Hopefully I did it right as I'm learning.

res := make([]uint64, 100000)
fibonacci.GenerateSlice(res)

// PopulateSlice does this...
func PopulateSlice(data []uint64) {
    var start uint16 = 1000
    var counter uint32
    for start >= 1 {
        var num = 90
        var n1, n2, temp uint64 = 0, 1, 0

        for num >= 1 {
            temp = n2
            n1, n2 = temp, n1+n2
            data[counter] = n2
            counter++
            num--
        }
        start--
    }
}

Returning it.

func GenerateSlice() []uint64 {
    data := make([]uint64, 0, 100000)
    var start uint16 = 1000
    var counter uint32
    for start >= 1 {
        var num = 90
        var n1, n2, temp uint64 = 0, 1, 0

        for num >= 1 {
            temp = n2
            n1, n2 = temp, n1+n2
            // data[counter] = n2
            data = append(data, n2)
            counter++
            num--
        }
        start--
    }
    return data
}

I'm wondering if it's possible use sync.Pool with an array or slice?

Yes, sync.Pool can be used with any Go values.

A use case, quoting from its doc:

An example of good use of a Pool is in the fmt package, which maintains a dynamically-sized store of temporary output buffers. The store scales under load (when many goroutines are actively printing) and shrinks when quiescent.

However, it your case most likely it would not result in a performance gain. Arrays are "values", so when you pass an array, its value (all its elements) are copied. So if you would put an array into the pool, it would be copied. When you would get an array from your pool, it again would be copied. This is not an improvement, it's a detriment.

Slices on the other hand are "nice" headers, pointing to a backing array. So passing / getting slices means just passing / getting this header. With slices, you may very well experience a performance boost. Benchmark!

See related: Are golang slices passed by value?