Skip to content

Java prism finalization#3532

Merged
enebo merged 2 commits intoruby:mainfrom
andreaTP:finalize-chicory-aot
Apr 1, 2025
Merged

Java prism finalization#3532
enebo merged 2 commits intoruby:mainfrom
andreaTP:finalize-chicory-aot

Conversation

@andreaTP
Copy link
Copy Markdown
Contributor

Tightening up the Java Wasm integration.

Here we are using WasmModuleInterface to generate an easy to use API(it's generated on the fly you need to compile the project to actually see it) out of Prism.

After this PR gets merged we are ready to publish to Maven Central a self contained package of about ~550Kb that can be used as a direct dependency from Java projects.
To do it I'll need a bit of guidance (choosing maintainers/links/licensing etc. in the pom.xml), I can start by opening a WIP PR and I can work together with a maintainer to bring it home if that's something you would like to pursue.
Alternatively I'd like to ask permission to publish from an organization I own.

@andreaTP
Copy link
Copy Markdown
Contributor Author

andreaTP commented Apr 1, 2025

I took the time to benchmark Prism in interpreted mode vs. the precompiled AOT we just introduced and here are my numbers (measuring throughput, higher is better):

Benchmark                              (mode)   Mode  Cnt      Score       Error  Units
ChicoryPrismTest.chicoryTest      interpreter  thrpt    3   1127.487 ±   210.731  ops/s
ChicoryPrismTest.chicoryTest  precompiled-aot  thrpt    3  35259.004 ± 12965.255  ops/s

The AOT is 30X faster, if @enebo early measures are still valid I think there are chances to use it as default in JRuby 🙂 , cc. @headius

Source code of the benchmark.

@andreaTP andreaTP force-pushed the finalize-chicory-aot branch from 071940d to b70b76a Compare April 1, 2025 13:31
@enebo
Copy link
Copy Markdown
Collaborator

enebo commented Apr 1, 2025

There are two fails here but this is unrelated to this PR and those jobs are not used at all by these Java changes:

test-all
This is a scheduled Ubuntu 20.04 brownout. Ubuntu 20.04 LTS runner will be removed on 2025-04-15. For more details, see actions/runner-images#11101

@enebo enebo merged commit 70c9921 into ruby:main Apr 1, 2025
55 of 57 checks passed
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.

2 participants