{"id":46902125,"url":"https://github.com/marcelkottmann/armembeddon-codon-fork","last_synced_at":"2026-03-11T00:11:07.962Z","repository":{"id":324336458,"uuid":"1092341455","full_name":"marcelkottmann/armembeddon-codon-fork","owner":"marcelkottmann","description":"codon fork including some changes for armembeddon","archived":false,"fork":false,"pushed_at":"2025-11-15T06:01:25.000Z","size":7115,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-15T08:13:06.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelkottmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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-11-08T12:58:08.000Z","updated_at":"2025-11-15T06:01:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marcelkottmann/armembeddon-codon-fork","commit_stats":null,"previous_names":["marcelkottmann/armembeddon-codon-fork"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/marcelkottmann/armembeddon-codon-fork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelkottmann%2Farmembeddon-codon-fork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelkottmann%2Farmembeddon-codon-fork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelkottmann%2Farmembeddon-codon-fork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelkottmann%2Farmembeddon-codon-fork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelkottmann","download_url":"https://codeload.github.com/marcelkottmann/armembeddon-codon-fork/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelkottmann%2Farmembeddon-codon-fork/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30362948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-11T00:11:07.240Z","updated_at":"2026-03-11T00:11:07.938Z","avatar_url":"https://github.com/marcelkottmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n \u003cimg src=\"docs/img/codon-banner.svg\" alt=\"Codon banner\"/\u003e\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"https://docs.exaloop.io/codon\" target=\"_blank\"\u003e\u003cb\u003eDocs\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026#183;\u0026nbsp;\n  \u003ca href=\"https://docs.exaloop.io/codon/general/faq\" target=\"_blank\"\u003e\u003cb\u003eFAQ\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026#183;\u0026nbsp;\n  \u003ca href=\"https://exaloop.io/blog\" target=\"_blank\"\u003e\u003cb\u003eBlog\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026#183;\u0026nbsp;\n  \u003ca href=\"https://discord.gg/HeWRhagCmP\" target=\"_blank\"\u003eDiscord\u003c/a\u003e\n  \u0026nbsp;\u0026#183;\u0026nbsp;\n  \u003ca href=\"https://docs.exaloop.io/codon/general/roadmap\" target=\"_blank\"\u003eRoadmap\u003c/a\u003e\n  \u0026nbsp;\u0026#183;\u0026nbsp;\n  \u003ca href=\"https://exaloop.io/#benchmarks\" target=\"_blank\"\u003eBenchmarks\u003c/a\u003e\n\u003c/h3\u003e\n\n\u003ca href=\"https://github.com/exaloop/codon/actions/workflows/ci.yml\"\u003e\n  \u003cimg src=\"https://github.com/exaloop/codon/actions/workflows/ci.yml/badge.svg\"\n       alt=\"Build Status\"\u003e\n\u003c/a\u003e\n\n# What is Codon?\n\nCodon is a high-performance Python implementation that compiles to native machine code without\nany runtime overhead. Typical speedups over vanilla Python are on the order of 10-100x or more, on\na single thread. Codon's performance is typically on par with (and sometimes better than) that of\nC/C++. Unlike Python, Codon supports native multithreading, which can lead to speedups many times\nhigher still.\n\n*Think of Codon as Python reimagined for static, ahead-of-time compilation, built from the ground\nup with best possible performance in mind.*\n\n## Goals\n\n- :bulb: **No learning curve:** Be as close to CPython as possible in terms of syntax, semantics and libraries\n- :rocket: **Top-notch performance:** At *least* on par with low-level languages like C, C++ or Rust\n- :computer: **Hardware support:** Full, seamless support for multicore programming, multithreading (no GIL!), GPU and more\n- :chart_with_upwards_trend: **Optimizations:** Comprehensive optimization framework that can target high-level Python constructs\n  and libraries\n- :battery: **Interoperability:** Full interoperability with Python's ecosystem of packages and libraries\n\n## Non-goals\n\n- :x: *Drop-in replacement for CPython:* Codon is not a drop-in replacement for CPython. There are some\n  aspects of Python that are not suitable for static compilation — we don't support these in Codon.\n  There are ways to use Codon in larger Python codebases via its [JIT decorator](https://docs.exaloop.io/codon/interoperability/decorator)\n  or [Python extension backend](https://docs.exaloop.io/codon/interoperability/pyext). Codon also supports\n  calling any Python module via its [Python interoperability](https://docs.exaloop.io/codon/interoperability/python).\n  See also [*\"Differences with Python\"*](https://docs.exaloop.io/codon/general/differences) in the docs.\n\n- :x: *New syntax and language constructs:* We try to avoid adding new syntax, keywords or other language\n  features as much as possible. While Codon does add some new syntax in a couple places (e.g. to express\n  parallelism), we try to make it as familiar and intuitive as possible.\n\n## How it works\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"docs/img/codon-pipeline.svg\" width=\"90%\" alt=\"Codon figure\"/\u003e\n\u003c/p\u003e\n\n# Quick start\n\nDownload and install Codon with this command:\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://exaloop.io/install.sh)\"\n```\n\nAfter following the prompts, the `codon` command will be available to use. For example:\n\n- To run a program: `codon run file.py`\n- To run a program with optimizations enabled: `codon run -release file.py`\n- To compile to an executable: `codon build -release file.py`\n- To generate LLVM IR: `codon build -release -llvm file.py`\n\nMany more options are available and described in [the docs](https://docs.exaloop.io/codon/general/intro).\n\nAlternatively, you can [build from source](https://docs.exaloop.io/codon/advanced/build).\n\n# Examples\n\n## Basics\n\nCodon supports much of Python, and many Python programs will work with few if any modifications.\nHere's a simple script `fib.py` that computes the 40th Fibonacci number...\n\n``` python\nfrom time import time\n\ndef fib(n):\n    return n if n \u003c 2 else fib(n - 1) + fib(n - 2)\n\nt0 = time()\nans = fib(40)\nt1 = time()\nprint(f'Computed fib(40) = {ans} in {t1 - t0} seconds.')\n```\n\n... run through Python and Codon:\n\n```\n$ python3 fib.py\nComputed fib(40) = 102334155 in 17.979357957839966 seconds.\n$ codon run -release fib.py\nComputed fib(40) = 102334155 in 0.275645 seconds.\n```\n\n## Using Python libraries\n\nYou can import and use any Python package from Codon via `from python import`. For example:\n\n```python\nfrom python import matplotlib.pyplot as plt\ndata = [x**2 for x in range(10)]\nplt.plot(data)\nplt.show()\n```\n\n(Just remember to set the `CODON_PYTHON` environment variable to the CPython shared library,\nas explained in the [the Python interoperability docs](https://docs.exaloop.io/codon/interoperability/python).)\n\n## Parallelism\n\nCodon supports native multithreading via [OpenMP](https://www.openmp.org/). The `@par` annotation\nin the code below tells the compiler to parallelize the following `for`-loop, in this case using\na dynamic schedule, chunk size of 100, and 16 threads.\n\n```python\nfrom sys import argv\n\ndef is_prime(n):\n    factors = 0\n    for i in range(2, n):\n        if n % i == 0:\n            factors += 1\n    return factors == 0\n\nlimit = int(argv[1])\ntotal = 0\n\n@par(schedule='dynamic', chunk_size=100, num_threads=16)\nfor i in range(2, limit):\n    if is_prime(i):\n        total += 1\n\nprint(total)\n```\n\nNote that Codon automatically turns the `total += 1` statement in the loop body into an atomic\nreduction to avoid race conditions. Learn more in the [multithreading docs](https://docs.exaloop.io/codon/advanced/parallel).\n\nCodon also supports writing and executing GPU kernels. Here's an example that computes the\n[Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set):\n\n```python\nimport gpu\n\nMAX    = 1000  # maximum Mandelbrot iterations\nN      = 4096  # width and height of image\npixels = [0 for _ in range(N * N)]\n\ndef scale(x, a, b):\n    return a + (x/N)*(b - a)\n\n@gpu.kernel\ndef mandelbrot(pixels):\n    idx = (gpu.block.x * gpu.block.dim.x) + gpu.thread.x\n    i, j = divmod(idx, N)\n    c = complex(scale(j, -2.00, 0.47), scale(i, -1.12, 1.12))\n    z = 0j\n    iteration = 0\n\n    while abs(z) \u003c= 2 and iteration \u003c MAX:\n        z = z**2 + c\n        iteration += 1\n\n    pixels[idx] = int(255 * iteration/MAX)\n\nmandelbrot(pixels, grid=(N*N)//1024, block=1024)\n```\n\nGPU programming can also be done using the `@par` syntax with `@par(gpu=True)`. See the\n[GPU programming docs](https://docs.exaloop.io/codon/advanced/gpu) for more details.\n\n## NumPy support\n\nCodon includes a feature-complete, fully-compiled native NumPy implementation. It uses the same\nAPI as NumPy, but re-implements everything in Codon itself, allowing for a range of optimizations\nand performance improvements.\n\nHere's an example NumPy program that approximates $\\pi$ using random numbers...\n\n``` python\nimport time\nimport numpy as np\n\nrng = np.random.default_rng(seed=0)\nx = rng.random(500_000_000)\ny = rng.random(500_000_000)\n\nt0 = time.time()\n# pi ~= 4 x (fraction of points in circle)\npi = ((x-1)**2 + (y-1)**2 \u003c 1).sum() * (4 / len(x))\nt1 = time.time()\n\nprint(f'Computed pi~={pi:.4f} in {t1 - t0:.2f} sec')\n```\n\n... run through Python and Codon:\n\n```\n$ python3 pi.py\nComputed pi~=3.1417 in 2.25 sec\n$ codon run -release pi.py\nComputed pi~=3.1417 in 0.43 sec\n```\n\nCodon can speed up NumPy code through general-purpose and NumPy-specific compiler optimizations,\nincluding inlining, fusion, memory allocation elision and more. Furthermore, Codon's NumPy\nimplementation works with its multithreading and GPU capabilities, and can even integrate with\n[PyTorch](https://pytorch.org). Learn more in the [Codon-NumPy docs](https://docs.exaloop.io/codon/interoperability/numpy).\n\n# Documentation\n\nPlease see [docs.exaloop.io](https://docs.exaloop.io) for in-depth documentation.\n\n# Acknowledgements\n\nThis project would not be possible without:\n\n- **Funding**:\n  - National Science Foundation (NSF) 🇺🇸\n  - National Institutes of Health (NIH) 🇺🇸\n  - MIT 🇺🇸\n  - MIT E14 Fund 🇺🇸\n  - Natural Sciences and Engineering Research Council (NSERC) 🇨🇦\n  - Canada Research Chairs 🇨🇦\n  - Canada Foundation for Innovation 🇨🇦\n  - B.C. Knowledge Development Fund 🇨🇦\n  - University of Victoria 🇨🇦\n- **Libraries**:\n  [LLVM Compiler Infrastructure](https://llvm.org/),\n  [yhirose's peglib](https://github.com/yhirose/cpp-peglib),\n  [Boehm-Demers-Weiser Garbage Collector](https://github.com/ivmai/bdwgc),\n  [KonanM's tser](https://github.com/KonanM/tser),\n  [{fmt}](https://github.com/fmtlib/fmt),\n  [toml++](https://marzer.github.io/tomlplusplus/),\n  [semver](https://github.com/Neargye/semver),\n  [zlib-ng](https://github.com/zlib-ng/zlib-ng),\n  [xz](https://github.com/tukaani-project/xz),\n  [bz2](https://sourceware.org/bzip2/),\n  [Google RE2](https://github.com/google/re2),\n  [libbacktrace](https://github.com/ianlancetaylor/libbacktrace),\n  [fast_float](https://github.com/fastfloat/fast_float),\n  [Google Highway](https://github.com/google/highway),\n  [NumPy](https://numpy.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelkottmann%2Farmembeddon-codon-fork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelkottmann%2Farmembeddon-codon-fork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelkottmann%2Farmembeddon-codon-fork/lists"}