ByteDance Web Infra
ByteDance Web Infra
Jul 8, 2025 · Fundamentals

How to Build Ultra‑Fast Static Query Maps in Rust Without Runtime Overhead

This article explains why embedding large static JSON data is inefficient, introduces Minimal Perfect Hash Functions (MPHF) and various static map constructions, shows how to pack strings and avoid relocation overhead, and demonstrates the resulting improvements in binary size, lookup speed, memory usage, and compile time.

Rustcompile-time optimizationminimal perfect hash
0 likes · 12 min read
How to Build Ultra‑Fast Static Query Maps in Rust Without Runtime Overhead
21CTO
21CTO
Apr 2, 2016 · Backend Development

How to Reduce PHP Array Memory Usage with String Packing

This article explains why PHP arrays consume far more memory than their C equivalents and demonstrates a technique that stores a double array in a string using pack/unpack, which can dramatically lower memory consumption at the cost of some performance.

backend developmentmemory optimizationstring packing
0 likes · 3 min read
How to Reduce PHP Array Memory Usage with String Packing