# Erlang\_python - Run Python across your Elixir cluster

**URL:** <https://forum.elixirforum.com/t/erlang-python-run-python-across-your-elixir-cluster/74613>\
**Category:** Announcing\
**Tags:** erlang, library, machine-learning, python, cluster, ai\
**Created:** [March 12, 2026, 2:34pm UTC](https://forum.elixirforum.com/t/erlang-python-run-python-across-your-elixir-cluster/74613 "2026-03-12T14:34:47Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![benoitc](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benoitc/32/40012_2.png) [@benoitc](https://forum.elixirforum.com/u/benoitc)\
**Post date:** [March 12, 2026, 9:01pm UTC](https://forum.elixirforum.com/t/erlang-python-run-python-across-your-elixir-cluster/74613/5 "2026-03-12T21:01:15Z")

</div>

you can run benchmarks in the example folder:

```elixir
➜ erlang-python git:(main) ✗ escript examples/bench_channel_async.erl

========================================
Channel Benchmark: Sync vs Async
========================================

System Information:
  Erlang/OTP: 28
  Python: 3.9.6 (default, Dec 2 2025, 07:27:58)
[Clang 17.0.0 (clang-1700.6.3.2)]

Python channel helpers ready.

--- Sync Channel Benchmark ---
(Erlang send + NIF try_receive - pure Erlang)

    Size | Throughput | Avg (us)
--------------------------------------
      64 | 10416667 | 0.10
    1024 | 6180470 | 0.16
   16384 | 833472 | 1.20

--- Async Task API Benchmark ---
(py_event_loop:create_task + await using stdlib)

      Operation | Throughput | Avg (us)
--------------------------------------------
      math.sqrt | 101174 | 9.88
     concurrent | 374111 | 2.67

--- Sync vs Async Comparison ---
(Channel operations: NIF sync vs py:call)

Message size: 1024 bytes, Iterations: 1000

         Method | Time (ms) | Throughput
---------------------------------------------
       NIF sync | 0.20 | 5102041
   py:call sync | 4.38 | 228154
     async task | 8.10 | 123426
    spawn batch | 3.38 | 295508

NIF sync is 22.4x faster than py:call
NIF sync is 41.3x faster than async task
Spawn batch is 2.4x faster than sequential async

========================================
Benchmark Complete
========================================

```

> **[erlang-python/examples at main · benoitc/erlang-python](https://github.com/benoitc/erlang-python/tree/main/examples)**
>
> main/examples

It’s used in a coming product and you can find it used in barrel\_embed and some other products like hornbeam. recently I only merged and fixed . I’m pushing version when i introduce breaking change, also. The moment I start to use it for supported products it becomes 1.0.

---

_[View the full topic](https://forum.elixirforum.com/t/erlang-python-run-python-across-your-elixir-cluster/74613)._
