{"id":31480393,"url":"https://github.com/kitsuyaazuma/pyconjp2025","last_synced_at":"2025-10-02T05:03:42.589Z","repository":{"id":313823533,"uuid":"1050158616","full_name":"kitsuyaazuma/pyconjp2025","owner":"kitsuyaazuma","description":"Demo code for the PyConJP 2025 talk: \"Beyond Multiprocessing: A Real-World ML Workload Speedup with Python 3.13+ Free-Threading\"","archived":false,"fork":false,"pushed_at":"2025-09-19T11:49:55.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T13:34:29.877Z","etag":null,"topics":["free-threading","python"],"latest_commit_sha":null,"homepage":"https://2025.pycon.jp/en/timetable/talk/HADBDX","language":"Python","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/kitsuyaazuma.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T03:16:55.000Z","updated_at":"2025-09-19T11:49:59.000Z","dependencies_parsed_at":"2025-09-08T21:33:23.182Z","dependency_job_id":"78d803bd-a79b-4af8-9330-67138f2f3cef","html_url":"https://github.com/kitsuyaazuma/pyconjp2025","commit_stats":null,"previous_names":["kitsuyaazuma/pyconjp2025"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kitsuyaazuma/pyconjp2025","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitsuyaazuma%2Fpyconjp2025","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitsuyaazuma%2Fpyconjp2025/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitsuyaazuma%2Fpyconjp2025/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitsuyaazuma%2Fpyconjp2025/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitsuyaazuma","download_url":"https://codeload.github.com/kitsuyaazuma/pyconjp2025/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitsuyaazuma%2Fpyconjp2025/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277958035,"owners_count":25905626,"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","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["free-threading","python"],"created_at":"2025-10-02T05:01:30.566Z","updated_at":"2025-10-02T05:03:42.584Z","avatar_url":"https://github.com/kitsuyaazuma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"| Link | Description |\n|:---|:---|\n| [Blog Post](https://alvinvin.hatenablog.jp/entry/17) | \tA detailed article based on this presentation. |\n| [Slides](https://speakerdeck.com/kitsuya0828/beyond-multiprocessing-a-real-world-ml-workload-speedup-with-python-3-dot-13-plus-free-threading) | The slides used for the talk at PyCon JP 2025. |\n| [BlazeFL](https://github.com/blazefl/blazefl) | The free-threading based Federated Learning framework. |\n\n# pyconjp2025\n\nThis repository contains the demonstration code for the PyConJP 2025 talk: \"[Beyond Multiprocessing: A Real-World ML Workload Speedup with Python 3.13+ Free-Threading](https://2025.pycon.jp/en/timetable/talk/HADBDX)\".\n\nIt provides a suite of benchmarks designed to compare the performance of standard CPython (with the Global Interpreter Lock) against the free-threading build of CPython 3.14.\n\n## Benchmarks\n\nThe following benchmarks are included:\n\n- **Prime Counting**: A CPU-bound task that counts prime numbers up to a given limit, implemented with both `threading` and `multiprocessing`.\n\n- **Array Summation**: Another CPU-bound task that calculates the sum of a large NumPy array using different concurrency models: `threading`, `multiprocessing`, and `multiprocessing` with shared memory.\n\n## Getting Started\n\n### Prerequisites\n\n- [uv](https://docs.astral.sh/uv/getting-started/installation/) package manager\n\n### Setup\n\n#### 1. Clone the repository\n\n```bash\ngit clone https://github.com/kitsuyaazuma/pyconjp2025.git\ncd pyconjp2025\n```\n\n#### 2. Install dependencies:\n\n```bash\nuv sync\n```\n\n#### 3. Set up Python environment:\n\n- With GIL (Standard CPython):\n\n  ```bash\n  make gil\n  ```\n\n- Without GIL (free-threading CPython):\n\n  ```bash\n  make nogil\n  ```\n\n### Running the Benchmarks\n\nTo run the full suite of benchmarks:\n\n```bash\nuv run python main.py\n```\n\nThe script will execute each benchmark with a range of worker counts, displaying the results in the console and saving them as CSV files and PNG graphs in the `results/` directory.\n\nYou can customize the number of runs for each benchmark using the `--runs` option:\n\n```\nuv run python main.py --runs 5\n```\n\n### Running Individual Benchmarks\n\nYou can also run each benchmark as a Python module to have more control over the parameters.\n\n- Array Summation Benchmark:\n\n    ```bash\n    uv run python -m benchmark.cases.array_sum --max-workers 8 --runs 10 --size 100000000\n    ```\n\n- Prime Counting Benchmark:\n\n    ```bash\n    uv run python -m benchmark.cases.array_sum --max-workers 8 --runs 10 --size 100000000\n    ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitsuyaazuma%2Fpyconjp2025","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitsuyaazuma%2Fpyconjp2025","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitsuyaazuma%2Fpyconjp2025/lists"}