hn.today

Amber: Columnar, vectorised, in-mem array language with the working vocab of q

amber-lang.org3 points0 comments
Screenshot of Amber: Columnar, vectorised, in-mem array language with the working vocab of q

Amber is a compact, self-contained array and database engine written in portable C99, designed for column-oriented, in-memory workloads such as market data analysis. Its language borrows q’s vocabulary and supports tables, keyed tables, qSQL queries, joins - including a native as-of join - and vector operations. The implementation compiles expressions to bytecode, uses AVX2 or ARM NEON where available, and can parallelize large operations. Column attributes for sorted, unique, parted, and grouped data are implemented in C; marking data sorted turns lookups from linear scans into binary searches, with a reported improvement from 1.73 seconds to 1.4 milliseconds on two million rows. Amber also emphasizes zero-copy access: its column buffers can be shared directly with NumPy and Apache Arrow.

The project presents itself as both a usable engine and an extensible foundation, with a TCP query server, Python and Arrow integrations, notebook support, dashboards, a profiler, and a simulated market-data pipeline. That pipeline generates a partitioned store containing tens of millions of trades and quotes, and checks its realism against 21 published market patterns. Benchmarks compare Amber’s array primitives and qSQL layer with C, other array languages, NumPy, and DuckDB; results vary by workload, with Amber competitive in reductions but slower than C on vector arithmetic, grouping, and joins in the reported test. The project also documents its internals, performance costs, and correctness pitfalls, and can be built and run from a cloned repository without a system-wide installation.

Read on amber-lang.org0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.