Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkAppendIntSmall (0.18 sec)

  1. src/strconv/itoa_test.go

    		b.Run(Itoa(int(smallInt)), func(b *testing.B) {
    			for i := 0; i < b.N; i++ {
    				s := FormatInt(smallInt, 10)
    				BenchSink += len(s)
    			}
    		})
    	}
    }
    
    func BenchmarkAppendIntSmall(b *testing.B) {
    	dst := make([]byte, 0, 30)
    	const smallInt = 42
    	for i := 0; i < b.N; i++ {
    		dst = AppendInt(dst[:0], smallInt, 10)
    		BenchSink += len(dst)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 15 21:09:39 UTC 2022
    - 5.8K bytes
    - Viewed (0)
Back to top