mirror of
https://github.com/araddon/dateparse.git
synced 2025-01-19 19:26:09 +08:00
More typo changes
This commit is contained in:
parent
e654ac7b35
commit
cefe5b3dbe
@ -7,7 +7,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
go test -bench Parse
|
go test -bench Parse
|
||||||
|
|
||||||
BenchmarkShotgunParse 50000 37588 ns/op 13258 B/op 167 allocs/op
|
BenchmarkShotgunParse 50000 37588 ns/op 13258 B/op 167 allocs/op
|
||||||
@ -21,14 +20,13 @@ BenchmarkParseAny-4 200000 8627 ns/op 144 B/op 3 allo
|
|||||||
BenchmarkShotgunParse-8 50000 33940 ns/op 13136 B/op 169 allocs/op
|
BenchmarkShotgunParse-8 50000 33940 ns/op 13136 B/op 169 allocs/op
|
||||||
BenchmarkParseAny-8 200000 10146 ns/op 912 B/op 29 allocs/op
|
BenchmarkParseAny-8 200000 10146 ns/op 912 B/op 29 allocs/op
|
||||||
BenchmarkParseDateString-8 10000 123077 ns/op 208 B/op 13 allocs/op
|
BenchmarkParseDateString-8 10000 123077 ns/op 208 B/op 13 allocs/op
|
||||||
|
|
||||||
*/
|
*/
|
||||||
func BenchmarkShotgunParse(b *testing.B) {
|
func BenchmarkShotgunParse(b *testing.B) {
|
||||||
b.ReportAllocs()
|
b.ReportAllocs()
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
for _, dateStr := range testDates {
|
for _, dateStr := range testDates {
|
||||||
// This is the non dateparse traditional approach
|
// This is the non dateparse traditional approach
|
||||||
_ = parseShotgunStyle(dateStr)
|
_, _ = parseShotgunStyle(dateStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +35,7 @@ func BenchmarkParseAny(b *testing.B) {
|
|||||||
b.ReportAllocs()
|
b.ReportAllocs()
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
for _, dateStr := range testDates {
|
for _, dateStr := range testDates {
|
||||||
_ = ParseAny(dateStr)
|
_, _ = ParseAny(dateStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user