[preview] use chicory-redline in java wasm#4071
Conversation
|
Perf change: on this branch: https://github.com/ruby/prism/actions/runs/24157118380/job/70498905259?pr=4071#step:9:80 |
|
This is wild. Thank you for this crazy idea! |
|
Looking into this today. |
|
@andreaTP This is excellent. I have pushed snapshots all the way through to JRuby and can confirm that the performance is at least as good as our legacy Bison parser and only a little bit slower than a pure-native prism dylib. Both @enebo and I agree this is sufficient performance for us to ship in JRuby 10.1. We may even be able to enable Prism by default if we are comfortable with the remaining functional gaps (our issue, not yours). I did notice there's logging messages, though, and obviously these need to go away: @kddnewton Once @andreaTP fixes the logging messages and you are satisfied with the PR, it can be merged and I will release a 0.0.2 prism snapshot for us to ship with JRuby 10.1. The new Redline support will also mean we might not need to have a separate "prism-native" gem for JRuby and can just used the WASM artifacts directly. This is very exciting! |
|
Correction:
I will release a 0.0.2 artifact to Maven cental, since we can't ship with snapshot dependencies. prism-parser-wasm 0.0.2 will be based on this PR and use Chicory + Redline. |
This project was one of the biggest use-cases I attempted to tackle with the effort behind chicory-redline.
On my machine I have a great perf improvement, the integration should be safe in the sense that it gracefully fallback to Panama on Java 25+,
jffion Java 11+, pure chicory bytecode on unsupported architectures.Happy to hear any feedback!
cc. @headius @enebo