WIP: Experimental VM-based implementation #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.