Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for lenruneslice (0.13 sec)

  1. src/runtime/string_test.go

    	{"MixedLength", "$Ѐࠀက퀀𐀀\U00040000\U0010FFFF"},
    }
    
    var sinkInt int
    
    func BenchmarkRuneCount(b *testing.B) {
    	// Each sub-benchmark counts the runes in a string in a different way.
    	b.Run("lenruneslice", func(b *testing.B) {
    		for _, sd := range stringdata {
    			b.Run(sd.name, func(b *testing.B) {
    				for i := 0; i < b.N; i++ {
    					sinkInt += len([]rune(sd.data))
    				}
    			})
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 13 14:05:23 UTC 2022
    - 13.3K bytes
    - Viewed (0)
Back to top