jslt
jslt copied to clipboard
WIP: Experimental VM-based implementation
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.