Skip to content

Commit 4029383

Browse files
committed
tighten more
1 parent f65db53 commit 4029383

File tree

1 file changed

+34
-35
lines changed

1 file changed

+34
-35
lines changed

README.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@ GraalPy has first-class support for embedding in Java and can turn Python applic
77
[Java embedding](https://github.com/timfel/graalpy-jbang) using [JBang](https://www.jbang.dev/)[Standalone binary](https://github.com/timfel/racing-all-afternoon) of Python a game by [Joey Navarro](https://github.com/josephnavarro/racing-all-afternoon) with all dependencies included.
88
</sup>
99

10-
## Benefits of GraalPy
11-
12-
* **Low-overhead integration with Java and other languages.**
13-
14-
GraalPy [integrates](docs/user/Interoperability.md) with Java, JavaScript, Ruby, and other languages on GraalVM JDK, Oracle JDK, or OpenJDK.
15-
You can easily add GraalPy to your Java application using [Maven build tools](docs/user/PythonStandaloneBinaries.md#embedding-graalpy-in-a-java-application).
16-
JVM tools such as VisualVM or JFR work as you would expect.
17-
Native Image compilation using GraalVM Native Image is [well supported](docs/user/PythonNativeimages.md).
18-
Python's low-level [OS APIs](docs/user/OsInterface.md#java-backend) are emulated, so Java code can intercept standard streams, file system and socket access, or subprocess execution.
19-
20-
* **Compatible with the Python ecosystem**
21-
22-
GraalPy supports many libraries including PyTorch, Tensorflow, SciPy.
23-
For example, models from [Hugging Face](https://huggingface.co/) like Stable Diffusion or GPT that use [PyTorch](https://pytorch.org/) usually just work.
24-
We run the CPython test suite on every commit and are passing ~85% of it.
25-
We also run the tests of the [top PyPI packages](https://hugovk.github.io/top-pypi-packages/) on GraalPy every day.
26-
To see if packages you use work, we have created a [Python Compatibility Checker](https://www.graalvm.org/python/compatibility/).
27-
![](docs/mcd.svg)<sup>
28-
For more than 96% of the top PyPI packages, there is at least one recent version that installs successfully and we are currently passing over 50% of all tests those top packages.
29-
</sup>
30-
31-
* **Run Python code faster**
32-
33-
GraalPy usually executes pure Python code faster than CPython after JIT compilation.
34-
Performance when C extensions are involved is close to CPython, but can vary a lot depending on the specific interactions of C extension code and Python code.
35-
We see a geomean speedup of ~4 on the [Python Performance Benchmark Suite](https://pyperformance.readthedocs.io/) over CPython.
36-
![](docs/performance.svg)<sup>
37-
Benchmarks run via `pip install pyperformance && pyperformance run` on each of CPython, Jython, and GraalPy.
38-
Installation of each done via <tt>[pyenv](https://github.com/pyenv/pyenv)</tt>.
39-
Geomean speedup was calculated pair-wise against CPython on the intersection of benchmarks that run on both interpreters.
40-
</sup>
10+
## Why GraalPy?
11+
12+
**Low-overhead integration with Java and other languages.**
13+
14+
* [Interoperate](docs/user/Interoperability.md) with Java, JavaScript, Ruby, and other languages on GraalVM JDK, Oracle JDK, or OpenJDK
15+
* Easy to use with [Maven build tools](docs/user/PythonStandaloneBinaries.md#embedding-graalpy-in-a-java-application)
16+
* Monitor Python execution with JVM tools such as [VisualVM](http://visualvm.org/) or JFR
17+
* GraalVM Native Image [compilation is well supported](docs/user/PythonNativeimages.md)
18+
* Manage Python libraries' system access thanks to GraalPy's [Java-based emulation of Python OS APIs](docs/user/OsInterface.md#java-backend)
19+
20+
**Compatible with the Python ecosystem**
21+
22+
* Use almost any standard Python feature, the CPython tests run on every commit and pass ~85%
23+
* Access many [PyPI packages](https://pypi.org/) including *NumPy*, *PyTorch*, *Tensorflow*, and *SciPy*
24+
* Run models such as Stable Diffusion or GPT from [Hugging Face](https://huggingface.co/)
25+
* See if the packages you need work with our [Python Compatibility Checker](https://www.graalvm.org/python/compatibility/)
26+
![](docs/mcd.svg)<sup>
27+
We run the tests of the [top PyPI packages](https://hugovk.github.io/top-pypi-packages/) on GraalPy every day.
28+
For more than 96% of the top PyPI packages, there is at least one recent version that installs successfully and we are currently passing over 50% of all tests those top packages.
29+
</sup>
30+
31+
**Runs Python code faster**
32+
33+
* Pure Python code is often faster than on CPython thanks to JIT compilation
34+
* C extensions performance is close to CPython but varies depending on the specific interactions of native and Python code
35+
* Geomean speedup of ~4 on the [Python Performance Benchmark Suite](https://pyperformance.readthedocs.io/) over CPython
36+
![](docs/performance.svg)<sup>
37+
Benchmarks run via `pip install pyperformance && pyperformance run` on each of CPython, Jython, and GraalPy.
38+
Installation of each done via <tt>[pyenv](https://github.com/pyenv/pyenv)</tt>.
39+
Geomean speedup was calculated pair-wise against CPython on the intersection of benchmarks that run on both interpreters.
40+
</sup>
4141

4242
## Getting Started
4343

@@ -143,11 +143,10 @@ The _setup-python_ action supports GraalPy:
143143
<details>
144144
<summary><strong>Migrating Jython Scripts to GraalPy</strong></summary>
145145
146-
To run Jython scripts, you will need a GraalPy distribution running on the JVM so you can access Java classes from Python scripts.
147146
Most existing Jython code that uses Java integration will be based on a stable Jython release&mdash;however, these are only available in Python 2.x versions.
148-
First, to migrate your code from Python 2 to Python 3, follow [the official guide from the Python community](https://docs.python.org/3/howto/pyporting.html).
149-
To facilitate migration from Jython, GraalPy provides a mode that is "mostly compatible" with some of Jython's features, minus of course that Jython implements Python 2.7 and we implement Python 3+.
150-
We describe the current status of the compatibility mode [here](docs/user/Jython.md).
147+
To migrate your code from Python 2 to Python 3, follow [the official guide from the Python community](https://docs.python.org/3/howto/pyporting.html).
148+
GraalPy also provides a [special mode](docs/user/Jython.md) to facilitate migration.
149+
To run Jython scripts, you need to use a GraalPy distribution running on the JVM so you can access Java classes from Python scripts.
151150
152151
* Linux
153152

0 commit comments

Comments
 (0)