You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#25418534: JSON_EXTRACT USING WILDCARDS TAKES FOREVER
Patch #3:
find_child_doms() has two kinds of duplicate elimination. One for
removing duplicates that occur due to multiple ellipses, and one for
removing duplicates that occur due to auto-wrapping on results
returned by an ellipsis.
The first kind of duplicate elimination is performed by maintaining a
sorted set of results. The second kind performs a linear search of the
results to see if the value is already in the result vector.
This patch consolidates this code so that they both use the first kind
of duplicate elimination. It also makes sure that duplicate
elimination for auto-wrapping only happens for paths that could
produce duplicates (only if the auto-wrapping path leg comes after an
ellipsis path leg).
This is just a code cleanup. The microbenchmark results are
indistinguishable from noise.
Microbenchmarks (64-bit, Intel Core i7-4770 3.4 GHz, GCC 6.3):
BM_JsonDomSearchEllipsis 25443 ns/iter [+1.0%]
BM_JsonDomSearchEllipsis_OnlyOne 17757 ns/iter [+0.7%]
BM_JsonDomSearchKey 128 ns/iter [ 0.0%]
BM_JsonBinarySearchEllipsis 233469 ns/iter [-0.9%]
BM_JsonBinarySearchEllipsis_OnlyOne 226089 ns/iter [-1.5%]
BM_JsonBinarySearchKey 86 ns/iter [ 0.0%]
Change-Id: Ia62916098096032adf9f2ecc70a42c845f625c1c
0 commit comments