{"id":23943774,"url":"https://github.com/gzhonghui/taichi-mini","last_synced_at":"2026-05-14T18:32:19.115Z","repository":{"id":270199594,"uuid":"909614773","full_name":"GZhonghui/taichi-mini","owner":"GZhonghui","description":"如何编译 Python 代码","archived":false,"fork":false,"pushed_at":"2025-01-13T08:35:24.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T09:36:34.556Z","etag":null,"topics":["ast","llvm","taichi"],"latest_commit_sha":null,"homepage":"","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/GZhonghui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-29T09:00:23.000Z","updated_at":"2025-01-13T08:35:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef9434b5-02ae-4ca3-90b0-25484f11c32d","html_url":"https://github.com/GZhonghui/taichi-mini","commit_stats":null,"previous_names":["gzhonghui/taichi-mini"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZhonghui%2Ftaichi-mini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZhonghui%2Ftaichi-mini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZhonghui%2Ftaichi-mini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZhonghui%2Ftaichi-mini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GZhonghui","download_url":"https://codeload.github.com/GZhonghui/taichi-mini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427194,"owners_count":19799466,"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":["ast","llvm","taichi"],"created_at":"2025-01-06T06:13:24.817Z","updated_at":"2026-05-14T18:32:19.075Z","avatar_url":"https://github.com/GZhonghui.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# taichi-mini\n\n太极（[Taichi](https://github.com/taichi-dev/taichi)）很方便，一个装饰器就可以将 Python 代码加速数十倍。\n\n但这是怎么做到的？\n\n通过翻阅太极的文档和代码，我实现了这个迷你版的太极，它也可以帮你加速代码。\n\n当然，它不支持GPU、不支持复杂的语法、没有数学库、加速效果也没有那么好。\n\n它不是为了用于实际的生产环境，而是尝试用 2k 行左右的代码，介绍一种编译 Python 代码的方式。\n\n## 运行\n```\n# 需要首先安装好 LLVM\nmake\npython example.py\n\n# 在 Apple M1 芯片上的执行结果，大约加速了 60 倍\n[16:20:37] [MESSAGE] \u003e\u003e Taichi inited\n[16:20:37] [MESSAGE] \u003e\u003e function task_ti took 0.415144 seconds to execute\n[16:21:02] [MESSAGE] \u003e\u003e function task_no took 24.548944 seconds to execute\n[16:21:02] [MESSAGE] \u003e\u003e result check passed\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgzhonghui%2Ftaichi-mini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgzhonghui%2Ftaichi-mini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgzhonghui%2Ftaichi-mini/lists"}