[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. |
ca9d9d9 to
3cd9911
Compare
|
Logger removed, redline 0.0.2 released and ready to merge, please verify everything carefully as this is the first real-world usage of redline I'm aware of 😅 |
|
I'll push some snapshots through our CI and see how it looks. |
|
I flushed out all maven caches for the https://github.com/jruby/jruby/actions/runs/24418746698/job/71372429347 I'll also push an update to add a run of the core Ruby specs with prism enabled, but the language specs should cover 99% of all language constructs. Assuming nothing changes in the status of this job, we are good to merge this and I can do a round of releases to get it into JRuby master. |
|
Core spec run with Prism enabled: https://github.com/jruby/jruby/actions/runs/24430230203/job/71372858599 I'm not sure if @enebo has finished getting this green, so if it's red that should not invalidated the new redline wasm build. |
|
Language specs are as green with redline chicory as they were with chicory AOT! @kddnewton This can be merged now, and I'll push a 0.0.2 release. |
|
Only failure in the core specs was a missing parser warning; we're probably just not calling the right hook. Does not indict the redline build because I believe it failed before. |
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