.          .     83:LoopSearch:
      20ms       20ms     84:   for i = 0; i < lenBufferHexHash; i++ {
      90ms       90ms     85:           hhi0, hhi1 := bufferHexHash[i], 
bufferHexHash[i+1]
     390ms      390ms     86:           for j = 0; j < lenBufferHexSearch; 
j++ {
     710ms      710ms     87:                   hsj0, hsj1 := 
bufferHexSearch[j][0], bufferHexSearch[j][1]
     2.96s      2.96s     88:                   for k = 0; k < lenMaskHex; 
k++ {
         .          .     89:                           /*if 
bufferHexSearch[j][0] == bufferHexHash[i]&maskHex[k][0] &&
         .          .     90:                           
bufferHexSearch[j][1] == bufferHexHash[i+1]&maskHex[k][1] {*/
     4.74s      4.74s     91:                           if hsj0 == 
hhi0&maskHex[k][0] && hsj1 == hhi1&maskHex[k][1] {
         .          .     92:                                   bFind = true
         .          .     93:                                   break 
LoopSearch
         .          .     94:                           }
         .          .     95:                   }
         .          .     96:           }
         .          .     97:   }

this has a little improved performance
>
> BenchmarkFindHex-2               2000000               954 
> ns/op               0 B/op          0 allocs/op
> BenchmarkFindHexOpti-2           2000000               *759 ns/op*            
>    
> 0 B/op          0 allocs/op
>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to