Sobre o projeto

dash-em is a specialized string manipulation library written in C, designed to remove em-dashes (U+2014) from UTF-8 encoded text. The project is explicitly described as a "meme" or "joke" library, highlighting the absurdity of applying such high-performance optimization to a trivial task. However, the codebase is technically robust, featuring automatic detection of CPU capabilities and dispatch to the most efficient SIMD instruction set available (AVX-512, AVX2, SSE4.2, or NEON). The library includes micro-optimizations like loop unrolling and cache prefetching to maximize throughput. Benchmarks show impressive performance, with the core C library reaching speeds up to 42 GB/s and language bindings providing substantial speedups over native methods (e.g., up to 766x faster than pure Python). The library supports a wide range of programming languages, including JavaScript, Python, Go, Rust, Java, and more, making it a versatile tool for developers who need to clean text data efficiently.