{"id":13466699,"url":"https://github.com/Microsoft/Pyjion","last_synced_at":"2025-03-26T00:31:23.386Z","repository":{"id":41284450,"uuid":"42616661","full_name":"microsoft/Pyjion","owner":"microsoft","description":"Pyjion - A JIT for Python based upon CoreCLR","archived":true,"fork":false,"pushed_at":"2020-11-16T21:35:54.000Z","size":1892,"stargazers_count":1596,"open_issues_count":40,"forks_count":131,"subscribers_count":105,"default_branch":"master","last_synced_at":"2025-03-21T23:42:40.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-16T22:26:12.000Z","updated_at":"2025-03-17T15:42:27.000Z","dependencies_parsed_at":"2022-07-06T05:31:03.841Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/Pyjion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPyjion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPyjion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPyjion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPyjion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/Pyjion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566098,"owners_count":20636390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:00:48.938Z","updated_at":"2025-03-26T00:31:23.000Z","avatar_url":"https://github.com/microsoft.png","language":"C++","readme":"# Pyjion\nDesigning a JIT API for CPython\n\n## A note on development\n\n**Development has moved to https://github.com/tonybaloney/Pyjion**\n\n## FAQ\n\n### What are the goals of this project?\nThere are three goals for this project.\n\n1. Add a C API to CPython for plugging in a JIT\n2. Develop a JIT module using [CoreCLR](https://github.com/dotnet/coreclr) utilizing the C API mentioned in goal #1\n3. Develop a C++ framework that any JIT targeting the API in goal #1 can use to make development easier\n\nGoal #1 is to make it so that CPython can have a JIT plugged in as desired (CPython\nis the Python implementation you download from https://www.python.org/). That\nwould allow for an ecosystem of JIT implementations for Python where users can\nchoose the JIT that works best for their use-case. And by using CPython we hope\nto have compatibility with all code that it can run (both Python code as well\nas C extension modules).\n\nGoal #2 is to develop a JIT for CPython using the JIT provided by the\n[CoreCLR](https://github.com/dotnet/coreclr). It's cross-platform, liberally\nlicensed, and the original creator of Pyjion has a lot of experience with it.\n\nGoal #3 is to abstract out all of the common bits required to write a JIT\nimplementation for CPython. The idea is to create a framework where JIT\nimplementations only have to worry about JIT-specific stuff like _how_ to do\naddition and not _when_ to do addition.\n\n### How do you pronounce \"Pyjion\"?\nLike the word \"pigeon\". @DinoV wanted a name that had something with \"Python\"\n-- the \"Py\" part -- and something with \"JIT\" -- the \"JI\" part -- and have it be\npronounceable.\n\n### How do this compare to ...\n#### [PyPy](http://pypy.org/)?\n[PyPy](http://pypy.org/) is an implementation of Python with its own JIT. The\nbiggest difference compared to Pyjion is that PyPy doesn't support all C extension\nmodules without modification unless they use [CFFI](https://cffi.readthedocs.org)\nor work with the select subset of CPython's C API that PyPy does support.\nPyjion also aims to support many JIT compilers while PyPy only supports their\ncustom JIT compiler.\n\n#### [Pyston](http://pyston.org)?\n[Pyston](http://pyston.org) is an implementation of Python using\n[LLVM](http://llvm.org/) as a JIT compiler. Compared to Pyjion, Pyston has\npartial CPython C API support but not complete support. Pyston also only\nsupports LLVM as a JIT compiler.\n\n#### [Numba](http://numba.pydata.org/)?\n[Numba](http://numba.pydata.org/) is a JIT compiler for \"array-oriented and\nmath-heavy Python code\". This means that Numba is focused on scientific\ncomputing while Pyjion tries to optimize all Python code. Numba also only\nsupports LLVM.\n\n#### [IronPython](http://ironpython.net/)?\n[IronPython](http://ironpython.net/) is an implementation of Python that is\nimplemented using [.NET](http://microsoft.com/NET). While IronPython tries to\nbe usable from within .NET, Pyjion does not have a compatibility story with .NET.\nThis also means IronPython cannot use C extension modules while Pyjion can.\n\n#### [Psyco](http://psyco.sourceforge.net/)?\n[Psyco](http://psyco.sourceforge.net/) was a module that monkeypatched CPython\nto add a custom JIT compiler. Pyjion wants to introduce a proper C API for\nadding a JIT compiler to CPython instead of monkeypatching it. It should be\nnoted the creator of Psyco went on to be one of the co-founders of PyPy.\n\n#### [Unladen Swallow](https://en.wikipedia.org/wiki/Unladen_Swallow)?\n[Unladen Swallow](https://en.wikipedia.org/wiki/Unladen_Swallow) was an attempt\nto make LLVM be a JIT compiler for CPython. Unfortunately the project lost\nfunding before finishing their work after having to spend a large amount of\ntime fixing issues in LLVM's JIT compiler (which has greatly improved over the\nsubsequent years).\n\n#### [Nuitka](http://nuitka.net/) and [Shedskin](https://github.com/shedskin/shedskin)?\nBoth [Nuitka](http://nuitka.net/) and\n[Shedskin](https://github.com/shedskin/shedskin) are Python-to-C++ transpilers,\nwhich means they translate Python code into equivalent C++ code. Being a JIT,\nPyjion is not a transpiler.\n\n\n### Are you going to support OS X and/or Linux?\nYes! Goals #1 and #3 are entirely platform-agnostic while goal #2 of using\nCoreCLR as a JIT compiler is not an impedence to supporting OS X or Linux as\nit already supports the major OSs. The only reason Pyjion doesn't directly\nsupport Linux or OS X is entirely momentum/laziness: since the work is being\ndriven by Microsoft employees, it simply meant it was easier to get going on\nWindows.\n\n### Will this ever ship with CPython?\nGoal #1 is explicitly to add a C API to CPython to support JIT compilers. There\nis no expectation, though, to ship a JIT compiler with CPython. This is because\nCPython compiles with nothing more than a C89 compiler, which allows it to run\non many platforms. But adding a JIT compiler to CPython would immediately limit\nit to only the platforms that the JIT supports.\n\n### Does this help with using CPython w/ .NET or UWP?\nNo.\n\n## Code of Conduct\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com)\nwith any additional questions or comments.\n","funding_links":[],"categories":["Implementations","C++","资源列表","Implementations [🔝](#readme)","Awesome Python"],"sub_categories":["高性能","Implementations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMicrosoft%2FPyjion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMicrosoft%2FPyjion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMicrosoft%2FPyjion/lists"}