niranjanaryan

niranjanaryan

announcing zaml 0.2.0 — a Zig NIF YAML 1.2 parser for Elixir that wraps libyaml and ships with two performance wins over the existing native option on Hex:

  1. Single-shot map construction. Maps are built with one enif_make_map_from_arrays call instead of a per-pair enif_make_map_put, eliminating the O(n²) rehashing that dominated wide maps. This is most of the gain over fast_yaml on the flat 1M-key fixture.
  2. Zero-copy scalar sub-binaries. String scalars are returned as sub-binaries of the input rather than copied into freshly allocated binaries. The path is bounds-checked with a copy fallback, so it stays correct across libyaml versions that may write quoted/block scalars into their own buffer.

Headline numbers (Apple M3 Pro, avg of 5 runs):
Parser 1M-line flat 100k-key nested
zaml 0.2.0 0.84 s 0.53 s
fast_yaml 1.0.40 2.54 s 1.86 s
yamerl 0.10.0 30.27 s 23.88 s

This release also fixes anchors and aliases end-to-end — &name / *name now resolve, with anchor names copied into a parse-scoped arena because libyaml frees its event buffer after each event.

Build needs Zig 0.16+ and libyaml dev headers; mix.exs auto-detects Homebrew/Linux locations and injects the right CFLAGS/CPPFLAGS/LDFLAGS for rebar3-compiled deps.

Where Next? Top

Trending in Announcing Top

achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
gtcode
Aloha gang, There’s a new class of AI model out from TypeSafe. Jev is their flagship model. You can learn about it here: ...
New
danschultzer
I’ve moved the strategies out of PowAssent and created a multi-provider framework for Elixir. This way the strategies can be used in any ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
AstonJ
With advancements in AI gathering pace and set to increasingly accelerate, perhaps it’s worth having an annual thread on the topic - feel...
New
bartblast
If you haven’t tried Hologram yet, what’s stopped you? Here’s why I’m asking. Building a framework turns out to be two jobs, the framewo...
New
mat-hek
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn: This is possible because it now builds on a very stab...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews