forked from mattn/go-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a dedicated function for parsing the two most common timestamps used by sqlite3. ``` goos: darwin goarch: arm64 pkg: github.com/charlievieth/go-sqlite3 cpu: Apple M4 Pro │ base.10.txt │ new.10.txt │ │ sec/op │ sec/op vs base │ Suite/BenchmarkParseTime-14 11.347µ ± 0% 8.044µ ± 0% -29.11% (p=0.000 n=10) │ base.10.txt │ new.10.txt │ │ B/op │ B/op vs base │ Suite/BenchmarkParseTime-14 1.713Ki ± 0% 1.713Ki ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal │ base.10.txt │ new.10.txt │ │ allocs/op │ allocs/op vs base │ Suite/BenchmarkParseTime-14 64.00 ± 0% 64.00 ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal ``` timefmt benchmarks: ``` goos: darwin goarch: arm64 pkg: github.com/charlievieth/go-sqlite3/internal/timefmt cpu: Apple M4 Pro BenchmarkParse/Stdlib-14 11050214 103.5 ns/op 0 B/op 0 allocs/op BenchmarkParse/Timefmt-14 34134667 34.45 ns/op 0 B/op 0 allocs/op BenchmarkParse/Timefmt_T-14 33790362 33.97 ns/op 0 B/op 0 allocs/op PASS ok github.com/charlievieth/go-sqlite3/internal/timefmt 3.814s ```
- Loading branch information
1 parent
15edb4d
commit 1c28d1f
Showing
4 changed files
with
280 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters