Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path parser based on string:tokens/2 rather than neotoma peg parser. #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tsharju
Copy link
Contributor

@tsharju tsharju commented Jun 29, 2012

This branch replaces neotoma parser with a custom parser based on string:tokens/2. All tests pass. The only difference is that the characters used in property names is not limited in any way.

A quick timing test shows quite significant performance boost.

Master branch:

timer:tc(props_path_parser, parse, ["test.test[2].test"]).
{139,
 [{prop,<<"test">>},
  {prop,<<"test">>},
  {index,2},
  {prop,<<"test">>}]}

This branch:

timer:tc(props_path_parser, parse, ["test.test[2].test"]).
{9,
 [{prop,<<"test">>},
  {prop,<<"test">>},
  {index,2},
  {prop,<<"test">>}]}

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.

1 participant