[performance] GraalPython is slow when running Cython
Maintainer thường phản hồi trong vòng 1 ngày
@msimacek đang làm issue này rồi.
Từ ngày 29/7/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
I've been working on getting GraalPython tested on the Cython CI. It mostly works but it's really slow.
One aspect of this is the time spent running Cython itself. Note that this is pure Python code (so it doesn't involve any interaction with your C API emulation, which I know isn't considered a fast path) - while Cython has the option of compiling itself for speed I haven't done so here for the sake of the report.
For the sake of a demo I've just done checked out the cython repository from github and done
time python cython.py Cython/Compiler/*.py
that just runs cython on a bunch of its own files (but only to the c code generation stage, it doesn't invoke any C compilers).
Some results:
Python 3.11.9
-----------
real 1m3.896s
user 0m55.934s
sys 0m4.580s
GraalPython (from the file "graalpy-24.0.2-linux-amd64.tar.gz" from your releases page)
Python 3.10.13 (Thu Jul 04 12:42:45 UTC 2024)
[Graal, Oracle GraalVM, Java 22.0.2] on linux
--------------
real 8m2.008s
user 21m20.609s
sys 0m19.100s
PyPy (pypy3.10-v7.3.12-linux64)
---------------------------------------------
real 4m18.502s
user 4m10.389s
sys 0m0.938s
The upshot is that GraalPython is about 8 times slower than CPython, (and also uses 3 cores of my CPU most of that time while CPython is largely single-threaded).
I've included PyPy just as another data-point. It's also slower for this case (although not quite as slow as GraalPython) so we're clearly doing something that isn't JIT friendly....
I haven't done any profiling beyond this basic measurement (yet).
I do realise this is essentially an enormous code-dump with the complaint "it's slow", which is never a style of bug report that I'm very impressed with when I'm on the receiving end.
- Ngôn ngữ chính
- Python
- Star
- 1.7k
- Fork
- 155
- Merge trung bình
- 7 giờ 16 phút
- Pull request đã merge (30 ngày)
- 51
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của oracle/graalpython
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
oracle/graalpython#1105 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
oracle/graalpython#1102 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
oracle/graalpython#1133 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
oracle/graalpython#1112 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
oracle/graalpython#1111 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của oracle/graalpython
Issue tương tự
-
[request] poppler-data/0.4.12Đang mởupstream update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conan-io/conan-center-index#31098 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
john-kurkowski/tldextract#382 ·
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#132042 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepset-ai/haystack#13092 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
feder-cr/invisible_playwright_mcp#1408 ·
Maintainer thường phản hồi trong vòng 1 ngày