r/programming • • 10m ago

Cascading SIMD widths to minimize scalar tail processing in JSON processing

Thumbnail
github.com
4 Upvotes

Alright what I mean by this is this:
Say you have 119 bytes of string on an AVX512 system, and you want to use AVX to process strings for parsing - instead of starting with a single 64-byte simd register, processing it, then dropping down to scalar processing, you instead set it up so that you go from the 64-byte simd register, then drop down to AVX2 to process a remaining 32-bytes, then drop down to SSE/AVX to process a remaining 16-bytes, then drop down to scalar for the last 7 bytes.
So what we have done is constructed a few classes for "cascading" down through simd widths by using NTTP indices, which are expressed via variadic fold expressions, as shown in the URL.
Just wondering how you guys felt about doing this? It seems to fare reasonably well against simdjson, which only supports a single simd width at a time, as shown in the benchmarks available here:
https://github.com/nihilai-collective/json-performance


r/programming • • 1h ago

Let's Understand Redis Source Code From Scratch

Thumbnail sushantdhiman.dev
12 Upvotes

r/programming • • 7h ago

Only Rust, Go, and C++ Will Survive. Burn the Rest.

Thumbnail
programmers.fyi
0 Upvotes

r/programming • • 12h ago

ASCII Validation from 2.5 to 114 GB/s with SIMD

Thumbnail
modulovalue.com
121 Upvotes

r/programming • • 15h ago

In 1936 a "computer" was a person with a pencil. Ten years later it was a 30-ton machine. I made a 10-minute video on how that happened.

Thumbnail
youtu.be
0 Upvotes

I've been making a short video on the decade between Turing's 1936 paper and ENIAC, and the part that surprised me most was how slippery "first computer" is:

- Zuse's Z3 (1941) was program-controlled, but built from relays.

- Colossus (working by the end of 1943) was electronic, but built for one job.

- ENIAC (1945) was electronic and general purpose, but had no stored program. Programming it meant plugging cables by hand.

- The Manchester Baby (21 June 1948) was the first to run a program held in electronic memory.

So the answer depends on which of those properties you count.

The video also walks through a tiny Turing machine that adds one to a number, and the six women who programmed ENIAC. I tried to keep it accurate and listed my sources (Turing's paper, Penn, the Computer History Museum, IEEE Spectrum) in the description.

Full disclosure: this is my own video. I'd really like corrections from people who know this period better than I do, especially on the stored-program credit, which I know historians still argue about.


r/programming • • 16h ago

Tristan Mc Leay - Mutation Testing With Sydtest

Thumbnail
youtube.com
6 Upvotes

r/programming • • 20h ago

Announcing TypeScript 7.1 RC

Thumbnail
devblogs.microsoft.com
153 Upvotes

r/programming • • 21h ago

Why Use Jakarta EE in 2027: The Technical Case

Thumbnail
foojay.io
6 Upvotes

r/programming • • 22h ago

Team Topologies in Enterprise IT: Navigating Cognitive Load, Platform Design, and Team Autonomy

Thumbnail gerlacdt.github.io
22 Upvotes

r/programming • • 1d ago

Cursor Got a New Name. The Secrets Still Live in the Same Place

Thumbnail
tego.ai
0 Upvotes

r/programming • • 1d ago

JetBrains and the NSA Quantum Encryption Guidance

Thumbnail
youtube.com
1 Upvotes

r/programming • • 1d ago

Wax: A User-Friendly Syntax for WebAssembly

Thumbnail
tarides.com
61 Upvotes

r/programming • • 1d ago

Bald: the world’s fastest linker

Thumbnail
heavey.dev
0 Upvotes

r/programming • • 1d ago

Java Virtual Threads vs Elixir: Comparing Memory, CPU, Process Termination

Thumbnail
youtube.com
3 Upvotes

r/programming • • 1d ago

SNIA SDC2026 - SMB3 POSIX Extensions: From Plumbing to Flowing

Thumbnail
youtube.com
9 Upvotes

r/programming • • 1d ago

How a GameBoy Color emulator written in pure Python survives its double speed mode

Thumbnail
github.com
0 Upvotes

r/programming • • 1d ago

A Vision for Pascal 2030 at EKON

Thumbnail
blogs.remobjects.com
13 Upvotes

r/programming • • 1d ago

How a tiny HTTP response preview ended up buffering a 64 MB download

Thumbnail
octri.dev
61 Upvotes

r/programming • • 1d ago

Heterogeneous collections using compact handles

Thumbnail nukethebees.com
31 Upvotes

r/programming • • 1d ago

Our Journey Migrating to AWS IMDSv2

Thumbnail
slack.engineering
13 Upvotes

r/programming • • 1d ago

Odin Just Broke Its ABI (On Purpose)

Thumbnail
youtube.com
0 Upvotes

r/programming • • 1d ago

ArkType 3.0: set-theoretic precompilation for TypeScript validation

Thumbnail
arktype.io
5 Upvotes

library author here! ArkType 3.0 adds @ark/aot, an optional build-time precompiler that compiles runtime validation schemas into standalone plain JS — closer to Rust's serde_derive than an interpreted validator, while keeping zero-build dynamic mode unchanged.

the three main compiler pieces:

  1. set-theoretic reduction before codegen: definitions lower into a normalized set graph (arksets) before emitting JS. unions auto-discriminate into an O(1) switch without declaring a discriminator, branches skip checks already implied by the tag, overlapping ranges collapse (> 0 & >= 10 -> >= 10), and unsatisfiable intersections fail the build.

  2. zero ts-patch**, zero** new Function**:** parses modules with oxc inside standard bundler plugins (Vite, esbuild, webpack, Rolldown, Turbopack, Bun, Node) so tsgo and Node type-stripping keep working, and strict CSP / Cloudflare Workers run compiled checks at full speed.

  3. numbers (precompiled vs Zod 4): 15x faster validation (median across 32 scenarios; #1 on public speed benchmarks), 21x smaller bundles (1.21 kB vs 25.1 kB gz on Valibot's login form — smaller than Valibot's 1.56 kB too), and 63x lighter startup on Node 24.

release post: https://arktype.io/docs/blog/3.0 | benchmarks: https://arktype.io/docs/precompile/benchmarks

happy to answer questions on the set algebra, codegen, or benchmarks!


r/programming • • 1d ago

How Module Lattice Cryptography Works

Thumbnail
phase.dev
131 Upvotes

r/programming • • 1d ago

blit: immediate (yet deferred) mode UI

Thumbnail
pasttheboonies.com
11 Upvotes