Hacker News new | ask | show | jobs
Show HN: Ibex a C++ engine for Polars and standalone DSL (ibexlang.org)
4 points by Bootvis 51 minutes ago
IbexEngine is an alternative execution engine for Polars, using an approach similar to cuDF's. Write a lazy Polars pipeline, collect() them with the IbexEngine() and get a Polars DataFrame:

    from ibex_polars import IbexEngine

    df = query.collect(engine=IbexEngine())  # df: pl.DataFrame
The results below are against Polars 2.2 streaming:

- h2o groupby: 2.2x faster on 1 core, 1.6x on 8

- PDS-H SF-10: 5–8% faster (total 6.53s vs 6.83s on 8 cores)

- h2o joins: 27% faster on 1 core, 13% slower on 8

Of 3,519 queries from Polars' test suite, 2,320 match Polars exactly. The remaining 1,199 are rejected. Ibex doesn't support columns containing lists and supports a smaller number of int types, forcing most of the refusals. In practice, this shouldn't matter too much. Unsupported plans raise NotImplementedError before query execution so you don't waste time with late runtime errors. For a quick start:

    try:

        df = query.collect(engine=IbexEngine())

    except NotImplementedError:

        df = query.collect(engine="streaming")
Caveats: experimental, single person, LLM's, and pinned to exactly Polars 2.2.0 because it uses Polars' internal plan format. Wheels for Linux, Windows and macOS:

    pip install ibex-polars --find-links https://github.com/bobjansen/Ibex/releases/expanded_assets/v0.6.0
The Ibex DSL itself is a statically typed DataFrame language (without loops) written in C++, with a REPL and C++23 code generation. I think Ibex itself is amazing but the Polars engine is the quickets way to try it on your existing projects.
1 comments

Why not a table with total data size, selection percentage and timing? Size per time? What is 2x supposed to mean
I don’t quite follow, would you like to see filter performance for various tables? I did those tests as well but for sharing I focus on 3rd party benchmark suites, those are harder to game.

2x faster => 50% runtime