|
Ran
|
Jobs
1
|
Files
15
|
Run time
1s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/couchbaselabs/vellum/commit/<a class=hub.com/couchbaselabs/vellum/commit/78a7ffef1945a6738e840fd39a2010d8dd406ffa">78a7ffef1<a href="https://github.com/couchbaselabs/vellum/commit/78a7ffef1945a6738e840fd39a2010d8dd406ffa">">improve dfa building cache in regexp and levenshtein In both regexp and levenshtein packages we cache states, which are represented by slices of integers. To do this with a built-in Go map, we used a string key. Previously, this just did a simple fmt.Sprintf. This can be quite slow and can create significant garbage. This change switches to directly using a binary encoding of the integers, with a single allocation. In the case of cache hits, the Go runtime should also avoid string conversion. Below are the perf improvements observed: Levenshtein: benchmark old ns/op new ns/op delta BenchmarkNewMarty1-4 213276 136515 -35.99% BenchmarkNewMarty2-4 1002994 726862 -27.53% benchmark old allocs new allocs delta BenchmarkNewMarty1-4 1709 1128 -34.00% BenchmarkNewMarty2-4 8287 5783 -30.22% benchmark old bytes new bytes delta BenchmarkNewMarty1-4 370926 364893 -1.63% BenchmarkNewMarty2-4 1793785 1766334 -1.53% Regexp: benchmark old ns/op new ns/op delta BenchmarkNewWildcard-4 1876271 532032 -71.64% benchmark old allocs new allocs delta BenchmarkNewWildcard-4 16485 4688 -71.56% benchmark old bytes new bytes delta BenchmarkNewWildcard-4 456231 310473 -31.95% Change-Id: I</a><a class="double-link" href="https://github.com/couchbaselabs/vellum/commit/<a class="double-link" href="https://github.com/couchbaselabs/vellum/commit/6f2e462d6f34fa045319d8b3b2a45b18f5de13c1">6f2e462d6</a>">6f2e462d6</a><a href="https://github.com/couchbaselabs/vellum/commit/78a7ffef1945a6738e840fd39a2010d8dd406ffa"> Reviewed-on: http://review.couchbase.org/92519 Reviewed-by: Steve Yen <steve.yen@gmail.com> Tested-by: Marty Schoch <marty.schoch@g... (continued)
1096 of 1349 relevant lines covered (81.25%)
985.52 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 57.1 | 0 |
81.25 |
Travis Job 57.1 |