Move Map and Run onto Parser, and document stuff
This commit is contained in:
+8
-8
@@ -22,13 +22,13 @@ func BenchmarkBind5(b *testing.B) {
|
||||
input := gigaparsec.SliceReaderAt[byte]{0}
|
||||
b.Run("gigaparsec.Bind5", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(gigaparsec.Bind5), input)
|
||||
p(gigaparsec.Bind5).Run(input)
|
||||
}
|
||||
|
||||
})
|
||||
b.Run("naïve.Bind5", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(naive.Bind5), input)
|
||||
p(naive.Bind5).Run(input)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -46,13 +46,13 @@ func BenchmarkBind9(b *testing.B) {
|
||||
input := gigaparsec.SliceReaderAt[byte]{0}
|
||||
b.Run("gigaparsec.Bind9", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(gigaparsec.Bind9), input)
|
||||
p(gigaparsec.Bind9).Run(input)
|
||||
}
|
||||
|
||||
})
|
||||
b.Run("naive.Bind9", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(naive.Bind9), input)
|
||||
p(naive.Bind9).Run(input)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -72,12 +72,12 @@ func BenchmarkSeq5(b *testing.B) {
|
||||
input := gigaparsec.SliceReaderAt[byte]{0}
|
||||
b.Run("gigaparsec.Seq5", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(gigaparsec.Seq5), input)
|
||||
p(gigaparsec.Seq5).Run(input)
|
||||
}
|
||||
})
|
||||
b.Run("naive.Seq5", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(naive.Seq5), input)
|
||||
p(naive.Seq5).Run(input)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -97,12 +97,12 @@ func BenchmarkSeq9(b *testing.B) {
|
||||
input := gigaparsec.SliceReaderAt[byte]{0}
|
||||
b.Run("gigaparsec.Seq9", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(gigaparsec.Seq9), input)
|
||||
p(gigaparsec.Seq9).Run(input)
|
||||
}
|
||||
})
|
||||
b.Run("naive.Seq9", func(b *testing.B) {
|
||||
for range b.N {
|
||||
gigaparsec.Run(p(naive.Seq9), input)
|
||||
p(naive.Seq9).Run(input)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user