Skip to content

WIP: Experimental VM-based implementation#75

Open
larsga wants to merge 3 commits into
masterfrom
experiment-vm
Open

WIP: Experimental VM-based implementation#75
larsga wants to merge 3 commits into
masterfrom
experiment-vm

Conversation

@larsga
Copy link
Copy Markdown
Contributor

@larsga larsga commented May 31, 2019

This is an experiment to see if a VM that uses an efficient representation of JSON as an array of ints can be faster than the AST-based implementation that works on Jackson JsonNode objects.

So far, experiments indicate that object->object transforms can be about 40% faster.

This approach also has the benefit of being independent of Jackson. That is, the input no longer has to be parsed by Jackson, and it doesn't even really need to be JSON. Same with the output.

A lot more work would be needed to support all of JSLT on this VM, particularly as this branch doesn't even have an AST->bytecode compiler. Performance is likely to drop somewhat as more of JSLT is supported, but on the other hand there must be quite a lot of unexploited optimization opportunities in this code.

So work on this branch may continue in the future, as much for strategic reasons as for the pure performance gain.

Thoughts, comments, feedback all welcome.

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