@@ -674,51 +674,55 @@ func benchmark(b *testing.B, filename string, m matchfinder.MatchFinder, blockSi
674674}
675675
676676func TestEncodeM4 (t * testing.T ) {
677- test (t , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 18 , DistanceBitCost : 57 }, 1 << 16 )
677+ test (t , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 18 , DistanceBitCost : 66 }, 1 << 16 )
678+ }
679+
680+ func TestEncodeM4Chain256 (t * testing.T ) {
681+ test (t , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 18 , DistanceBitCost : 66 , ChainLength : 256 }, 1 << 16 )
678682}
679683
680684func BenchmarkEncodeM4 (b * testing.B ) {
681- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , DistanceBitCost : 57 }, 1 << 16 )
685+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , DistanceBitCost : 66 }, 1 << 16 )
682686}
683687
684688func TestEncodeM4Chain1 (t * testing.T ) {
685- test (t , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 18 , ChainLength : 1 , DistanceBitCost : 57 }, 1 << 16 )
689+ test (t , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 18 , ChainLength : 1 , DistanceBitCost : 66 }, 1 << 16 )
686690}
687691
688692func BenchmarkEncodeM4Chain1 (b * testing.B ) {
689- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 1 , DistanceBitCost : 57 }, 1 << 16 )
693+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 1 , DistanceBitCost : 66 }, 1 << 16 )
690694}
691695
692696func BenchmarkEncodeM4Chain2 (b * testing.B ) {
693- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 2 , DistanceBitCost : 57 }, 1 << 16 )
697+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 2 , DistanceBitCost : 66 }, 1 << 16 )
694698}
695699
696700func BenchmarkEncodeM4Chain4 (b * testing.B ) {
697- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 4 , DistanceBitCost : 57 }, 1 << 16 )
701+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 4 , DistanceBitCost : 66 }, 1 << 16 )
698702}
699703
700704func BenchmarkEncodeM4Chain8 (b * testing.B ) {
701- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 8 , HashLen : 5 , DistanceBitCost : 57 }, 1 << 16 )
705+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 8 , HashLen : 5 , DistanceBitCost : 66 }, 1 << 16 )
702706}
703707
704708func BenchmarkEncodeM4Chain16 (b * testing.B ) {
705- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 16 , HashLen : 5 , DistanceBitCost : 57 }, 1 << 16 )
709+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 16 , HashLen : 5 , DistanceBitCost : 66 }, 1 << 16 )
706710}
707711
708712func BenchmarkEncodeM4Chain32 (b * testing.B ) {
709- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 32 , HashLen : 5 , DistanceBitCost : 57 }, 1 << 16 )
713+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 32 , HashLen : 5 , DistanceBitCost : 66 }, 1 << 16 )
710714}
711715
712716func BenchmarkEncodeM4Chain64 (b * testing.B ) {
713- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 64 , HashLen : 5 , DistanceBitCost : 57 }, 1 << 16 )
717+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 64 , HashLen : 5 , DistanceBitCost : 66 }, 1 << 16 )
714718}
715719
716720func BenchmarkEncodeM4Chain128 (b * testing.B ) {
717- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 128 , HashLen : 5 , DistanceBitCost : 57 }, 1 << 16 )
721+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 128 , HashLen : 5 , DistanceBitCost : 66 }, 1 << 16 )
718722}
719723
720724func BenchmarkEncodeM4Chain256 (b * testing.B ) {
721- benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 256 , HashLen : 5 , DistanceBitCost : 57 }, 1 << 16 )
725+ benchmark (b , "testdata/Isaac.Newton-Opticks.txt" , & matchfinder.M4 {MaxDistance : 1 << 20 , ChainLength : 256 , HashLen : 5 , DistanceBitCost : 66 }, 1 << 16 )
722726}
723727
724728func TestEncodeM0 (t * testing.T ) {
0 commit comments