⚙️ Ibex: C++ engine runs Polars queries, with an open list of unsupported cases
In brief
- ⚙️ IbexEngine runs lazy Polars queries in a native C++ engine and returns an ordinary Polars DataFrame.
- 🧪 According to the project: 2.2x faster on h2o groupby on one core; PDS-H total 6.53 s against 6.83 s on eight cores.
- ⚠️ Of 3,519 test queries, 2,320 match and 1,199 are refused; experimental, pinned to Polars 2.2.0.
⚙️ Ibex is a statically typed DataFrame language written in C++ that now also works as an alternative execution engine for Polars. A lazy Polars query is collected with IbexEngine() and comes back as a Polars DataFrame. According to the project page and its developer, Ibex is 2.2x faster on h2o groupby on one core and 5 to 8 percent faster on PDS-H on eight cores, but 13 percent slower on joins on eight cores. 🧪 Unsupported queries raise NotImplementedError before execution; the project is experimental and pinned to Polars 2.2.0.
How it is used. According to the developer, IbexEngine takes an approach similar to cuDF's: write a lazy Polars pipeline and call `collect(engine=IbexEngine())`. As the [Ibex page on Polars](https://ibexlang.org/polars.html) describes it, the query first goes through Polars' own optimizer (predicate and projection pushdown, common-subplan elimination). A version-pinned adapter turns the optimized plan into a typed Ibex program, which runs in one native call on the C++ engine with the GIL released and returns with Polars' dtypes, null semantics and row order. `engine.explain(query)` prints the program. Python functions wrapped with `ibex_polars.udf` run inside the query; Polars' own `map_batches` and `map_elements` are not supported.
Numbers as the project states them. Against Polars 2.2 streaming: h2o groupby 2.2x faster on one core and 1.6x on eight; PDS-H at scale factor 10 totals 6.53 s against 6.83 s on eight cores; h2o joins 27 percent faster on one core and 13 percent slower on eight. The Polars page says Ibex is faster on 45 of 50 cases on one core and 42 of 50 on eight; the question grouping by all six id columns is slower on both. Single-core throughput is the focus, and multi-core scaling is still being extended. Every benchmark answer is checked against Polars before it is timed. The [benchmarks page](https://ibexlang.org/benchmarks.html) adds runs against DuckDB and names the machine and version of each run.
Limits. Of 3,519 queries from ten Polars test modules, 2,320 run with matching results, 1,199 are refused and none currently produces a different result. There is no automatic fallback; the developer suggests catching `NotImplementedError` and collecting with `engine="streaming"` instead. Float32 is computed in Float64, which can differ in edge cases. Pivots, list and struct columns and remote files are among the unsupported areas; supported ones include equality and as-of joins, window functions, rolling statistics, quantiles, regex search, Datetime with time zones and local Parquet. The developer himself calls the project experimental, built by one person and with LLMs.
Install and background. Wheels exist for Linux, Windows and macOS and are installed with `pip install ibex-polars` plus a link to the GitHub release (version 0.6.0). The language itself, the developer says, started from wanting simpler syntax than a host language allows: in Python libraries every column name needs quotes, while in Ibex it is written bare. It has a REPL and generates C++23 code.
Criticism. In the launch discussion, one commenter found the numbers hard to judge without explanation: anyone who finds a performance cliff in Polars can show a large factor with another engine, he argued, and he asked for reasoning about what Ibex does differently. The developer pointed to third-party benchmark suites and conceded that his own tests favour what he built and that honest benchmarking is hard.