Skip to content

Add support for compiling a lookup - #11

Merged
oliveagle merged 1 commit into
oliveagle:masterfrom
superfell:compile
Mar 14, 2018
Merged

Add support for compiling a lookup#11
oliveagle merged 1 commit into
oliveagle:masterfrom
superfell:compile

Conversation

@superfell

Copy link
Copy Markdown
Contributor

This separates out the tokenizing / step generation into a reusable result that you can then use to do many lookup operations. As most of the lookup time is spent generating tokens/steps this can be a big win, e.g.

goos: darwin
goarch: amd64
pkg: github.com/oliveagle/jsonpath
BenchmarkJsonPathLookupCompiled-8   	20000000	        89.5 ns/op
BenchmarkJsonPathLookup-8           	 1000000	      1733 ns/op

@oliveagle
oliveagle merged commit 604d46a into oliveagle:master Mar 14, 2018
@oliveagle

Copy link
Copy Markdown
Owner

👍

@superfell
superfell deleted the compile branch March 14, 2018 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants