forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
27 additions
and
31 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