Menu

Post image 1
Post image 2
1 / 2
0

I built a CSS selector engine that uses BigInt bitmasks and a dual Bloom bucket index instead of DOM traversal — AQE is now on npm

DEV Community·William Martin·about 1 month ago
#ph9loRnn
Reading 0:00
15s threshold

I've been frustrated with querySelectorAll performance in high-frequency scenarios for a while. On large DOMs (10k+ nodes) with 50–100 queries/second — think virtual DOM diffing, live dashboards, design tools — it becomes a real bottleneck. So I built AQE (Atomic Quantum Engine): a CSS selector engine that replaces tree traversal with flat, memory-mapped bitwise operations. HOW IT WORKS Every DOM node gets a 64-bit BigInt bitmask. Each CSS token (tag, .class, #id, [attr], pseudo-class) maps to a unique bit position. Matching a selector becomes a single integer AND: (nodeMask & targetMask) === targetMask No string parsing. No tree climbing. No attribute iteration at query time.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More