-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit fdfb53b
Added benchmarks for json deconding.
Results:
$ go test -v -benchmem -bench BenchmarkIndexParsing github.com/arduino/arduino-cli/arduino/libraries/librariesindex
=== RUN TestIndexer
--- PASS: TestIndexer (0.16s)
goos: linux
goarch: amd64
pkg: github.com/arduino/arduino-cli/arduino/libraries/librariesindex
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
BenchmarkIndexParsingStdJSON
BenchmarkIndexParsingStdJSON-8 5 214872730 ns/op 94.52 MB/s 58956539 B/op 418973 allocs/op
BenchmarkIndexParsingEasyJSON
BenchmarkIndexParsingEasyJSON-8 16 69215472 ns/op 293.42 MB/s 56162664 B/op 418966 allocs/op
PASS
ok github.com/arduino/arduino-cli/arduino/libraries/librariesindex 4.442s
easyjson is 3x faster.1 parent 479f143 commit fdfb53b
1 file changed
+26
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 | + | ||
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
25 | + | ||
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
| |||
113 | 115 |
| |
114 | 116 |
| |
115 | 117 |
| |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | ||
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
141 | + |
0 commit comments