Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkMakeSliceCopy (0.35 sec)

  1. src/runtime/slice_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime_test
    
    import (
    	"fmt"
    	"testing"
    )
    
    const N = 20
    
    func BenchmarkMakeSliceCopy(b *testing.B) {
    	const length = 32
    	var bytes = make([]byte, 8*length)
    	var ints = make([]int, length)
    	var ptrs = make([]*byte, length)
    	b.Run("mallocmove", func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 17 09:45:44 UTC 2020
    - 10.3K bytes
    - Viewed (0)
Back to top