

Fork 自微軟的 Pyjion 專案的 Python 3.10 + JIT 方案
source link: https://blog.gslin.org/archives/2021/11/13/10414/fork-%e8%87%aa%e5%be%ae%e8%bb%9f%e7%9a%84-pyjion-%e5%b0%88%e6%a1%88%e7%9a%84-python-3-10-jit-%e6%96%b9%e6%a1%88/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Fork 自微軟的 Pyjion 專案的 Python 3.10 + JIT 方案
在 Hacker News 上看到「Pyjion – A Python JIT Compiler (trypyjion.com)」這個專案,也是一個想要透過 JIT 加速 Python 的專案:
Pyjion is a drop-in JIT Compiler for Python 3.10. It can be pip installed into a CPython 3.10 installation on Linux, Mac OS X, or Windows.
看了一下是從微軟的 Pyjion 專案 fork 出來的,原來的專案最後一次 commit 是一年前,而且專案也已經標示為 archived (read-only mode),但有留下轉移的說明,也就是上面提到的專案:
Development has moved to https://github.com/tonybaloney/Pyjion
可以看到大部分的效能都已經進入改善階段 (很多導入 JIT 的專案在初期時會先變慢):
跟其他的 JIT 方案相比,Pyjion 的目標是高度相容現有 Python 的程式,包括各種 extension,這點的確是在用 PyPy 這些軟體時的痛點沒錯...
看起來透過 pip 裝好後就可以直接 import 進來用,後續就會生效:
import pyjion; pyjion.enable()
另外提一下,翻 Hacker News 留言的時候翻到這個害我笑出來,有夠新 XD
zatarc 3 days ago | unvote | prev | next [–]
Pyjion requires: CPython 3.10 and .NET 6
.NET 6 Release: 19 hours ago (https://github.com/dotnet/core/blob/main/release-notes/6.0/6...)
... ok.
Related
用 Semgrep 掃一些安全性的問題
在 Hacker News Daily 上看到「Semgrep」這個軟體,看名字本來還以為是 semantic grep,結果是個靜態分析工具: Static analysis at ludicrous speed Find bugs and enforce code standards 專案是用 Python 寫的,可以直接用 pip install semgrep 裝起來,然後直接下指令掃,像是在自己的專案裡面執行,這邊用的 ruleset 是 r2c-ci: semgrep --config=p/ci . 官方網站上的截圖看起來也整的不錯: 可以自己跑或是掛進 CI 裡面跑...
April 25, 2021In "Computer"
Facebook 放出 Pysa,靜態分析 Python 程式碼的工具
Facebook 丟出來的靜態分析工具,可以拿來分析 Python 程式碼:「Pysa: An open source static analysis tool to detect and prevent security issues in Python code」,專案在「facebook/pyre-check」這邊可以取得。 不過軟體居然是用 OCaml 寫的啊,另外已經包好了,可以用 pip 直接裝 pyre-check。 官方的說明裡面有提到要裝 watchman,不過這算是選擇性安裝,不裝 watchman 直接執行也可以用,只是會跳個訊息跟你說裝了可以遞增檢查: To enable pyre incremental, you can install watchman: https://facebook.github.io/watchman/docs/install 最近在寫的專案都是用 Python,剛好可以拿來掃這些專案...
August 9, 2020In "Computer"
在本機用 pip 直接安裝 PostgreSQL server
看到 PostgreSQL 官方站台上的介紹,可以直接用 Python 的 pip 指令安裝 PostgreSQL server:「Install a local, non-root PostgreSQL Server with Python "pip"」,專案在「postgresql-wheel」這邊。 照 GitHub 上面的說明跑了一下,還真的可以惡搞... 這樣如果真的要在 CI 裡面跑的話也簡單很多了?只要能 pip 裝軟體就能跟你拼 XDDD 也省掉需要設定一些權限跑 Docker-in-Docker...
September 2, 2021In "Computer"
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Notify me of follow-up comments by email.
Notify me of new posts by email.
Post navigation
Recommend
-
11
Pragmatic Projects - 務實的專案 September 12, 2020 千呼萬喚 終於等到Pragmatic Programmer 20週年紀念版 如果沒聽過這本書 你大概也聽過
-
10
Before Project - 專案啟動前 August 23, 2020 千呼萬喚 終於等到Pragmatic Programmer 20週年紀念版 如果沒聽過這本書 你大概也聽過
-
14
手動將 Vue CLI build 出來,然後再 push 至遠端部署,這些步驟雖然很簡單,但這樣不是很有效率,所以應透過自動部署來處理。本篇介紹如何透過 GitLab CI/CD 來將 Vue...
-
7
每次要開始寫一個 Node.js 搭配 TypeScript 的專案,都沒有一個能讓自己滿意的專案範本,不然就是網路上經常找到不完整的參考文件。這篇文章我打算建立一個 Node.js 搭配 TypeScri...
-
14
我一年大概都會幫幾家企業導入 Azure DevOps Server 平台,最近幫客戶導入的過程遇到了一個難題。一個方案檔中有 9 個專案,其中有 4 個 .NET Framework 4.7.2 類別庫專案、1 個 .NET Framework 4.7.2 的 ASP.NET Web Forms 專案、2 個 .NET Core 2.1 類別庫專...
-
6
Performance Cliffs A common bad property of many different JIT compilers is that of a "performance cliff": A seemingly reasonable code change, leading to massively reduced performance due to hitting some weird property of the JIT com...
-
9
Installation After following the installation steps, pyjion is a python module that you can import a Python 3.10 environment:
-
11
Time to JIT your Python with Pyjion? Episode #340, published Wed, Nov 10, 2021, recorded Wed, Nov 3, 2021....
-
3
Python 3.13 gets a JIT by Anthony Shaw, January 9, 2023...
-
8
Shaw: Python 3.13 gets a JIT [Posted January 9, 2024 by corbet] Anthony Shaw describes the new copy-and-patch...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK