![]() |
|
![]() |
| Which version was that with? GraalVM can JIT compile regular expressions these days, with the same compiler as everything else. They implemented TRegex on top of Truffle so regex can be inlined and optimized like regular code.
Performance does indeed depend on workload. There's a page that compares GraalPy vs CPython and Jython on the Python Performance Suite which aims to be "real world": https://www.graalvm.org/latest/reference-manual/python/Perfo... There the speedup is smaller, but this is partly because a lot of real world Python workloads these days spend all their time inside C or the GPU. Having a better implementation is still a good idea though, because it means more stuff can be done by researchers who don't know C++ well or at all. The point at which you're forced to get dedicated hackers involved to optimize gets pushed backwards if you can rely on a good JIT. |
![]() |
| That is a problem with Python as a language and a platform and has nothing to do with Graal. PyPy is in the same boat. If the alternative Python's banded together there would be 10. |
![]() |
| Yes, apparently it can
https://www.graalvm.org/dev/reference-manual/python/Native-E... > CPython provides a native extensions API for writing Python extensions in C/C++. GraalPy provides experimental support for this API, which allows many packages like NumPy and PyTorch to work well for many use cases. The support extends only to the API, not the binary interface (ABI), so extensions built for CPython are not binary compatible with GraalPy. Packages that use the native API must be built and installed with GraalPy, and the prebuilt wheels for CPython from pypi.org cannot be used. For best results, it is crucial that you only use the pip command that comes preinstalled in GraalPy virtualenvs to install packages. The version of pip shipped with GraalPy applies additional patches to packages upon installation to fix known compatibility issues and it is preconfigured to use an additional repository from graalvm.org where we publish a selection of prebuilt wheels for GraalPy. Please do not update pip or use alternative tools such as uv. |
![]() |
| For anyone interested, here's the PyPI repository with additional binary wheels for GraalPy:
https://www.graalvm.org/python/wheels/
We also want to make it easy for Python package maintainers to test and build wheels for GraalPy. It's already available via setup-python, and we are adding GraalPy support to cibuildwheel. If you need any help, please reach out to us! |
![]() |
| Pypy has cpyext which implements a subset of the C-API, however it comes with a long list of caveats, and is more of a backstop, they very much prefer cffi. |
![]() |
| Yes, but it isn't the only one, the oldest Ruby JIT goes back to Ruby Motion, still being sold.
I would not put Julia and Common Lisp on the scripting basket yep. |
![]() |
| The people disliking the language might also be the people that love it. I know I am in that camp.
It is a great language in many ways, that's why its shortcomings are so painful. |
![]() |
| Python 3 was a painful episode and I lingered on 2.7 and only ported over around 3.6.
But now 3.11 is fine again. Looking forward to faster releases. |
![]() |
| Hi, what's the deployment process like? Is there a program similar to warbler (for jruby) that builds a jar for a python program?
EDIT: I tried the native binary command here on a simple hello world script. It downloaded some stuff in the background, built the entire python and java and embedded it into a 350 MB ELF binary on linux after 15 minutes of using 24 GB RAM and 100% CPU. But I'd much prefer a smaller jar file which I can distribute cross-platform. https://www.graalvm.org/uploads/quick-references/GraalPy_v1/... |
![]() |
| Thanks for the question, nurettin.
Although GraalPy can create standalone applications [1], you don't have to turn your hello world script into a self-contained binary. You can, of course, create a JAR that depends on GraalPy, or a fat JAR that contains it, and deploy it just like any other Java application. We are still updating our docs to mention more details on this and publish some guides, apologies for the delay. [1] https://www.graalvm.org/latest/reference-manual/python/stand... |
![]() |
| DuckDB is not currently a supported package, but Pandas and matplotlib are which is good. If DuckDB and Polars were supported and if they ran well, I suspect many data jobs could benefit. |
![]() |
| Took a little digging to find that it targets 3.11. Didn’t see anything about a GIL. If you’re a Python person, don’t click the quick start link unless you want to look at some xml. |
![]() |
| Ghidra embeds Python scripting via Jython, which is stuck on Python 2. Switching to GraalPy would allow Python 3 scripting.
Any other Java programs that want a scripting engine could use it as well. |
![]() |
| Thanks. I actually managed to run the quick example with Temurin Java 22. Maybe that is what they mean by "OpenJDK": java.vm.name=OpenJDK 64-Bit Server VM, java.vendor.version=Temurin-22.0.2+9 |
![]() |
| An honorific. So much of this dynamic language performance improvement on the Graal JVM was proven out by Chris Seaton.
May he rest in peace. |
![]() |
| There is already an EE for it, so I guess they provide basic functionalities for free, and if you need additional features you have to pay? |
![]() |
| That it goes in the opposite direction of your cited project (run modern-ish python from within the JVM), and almost certainly has a much, much better JIT story than yours |
And here is a table representation of all benchmarks and the geomean and median overall results: http://software.rochus-keller.ch/awfy-bun-summary.ods
The implementation of the same benchmark suite runs around factor 2.4 (geomean) faster on JDK8 than on GraalPython EE 22.3 Hotspot, or 41 times faster than CPython 3.11. GraalPython is thus about 17 times faster than CPython, and about two times faster than PyPy. The Graal Enterprise Edition (EE) seem to be factor 1.31 faster than the Community Edition (CE).