Daniel Lemire

@lemire
535 Followers
111 Following
689 Posts
Computer science professor at the University of Quebec (TELUQ), open-source hacker, and long-time blogger. 👨‍💻
Only 17% of all 64-bit Integers are products of two 32-bit integers https://lemire.me/blog/2026/05/22/only-17-of-all-64-bit-integers-are-products-of-two-32-bit-integers/
The fastest way to match characters on ARM processors?

Consider the following problem. Given a string, you must match all of the ASCII white-space characters (\t, \n, \r, and the space) and some characters important in JSON (:, ,, [, ], {, }). JSON is a text-based data format used for web services. A toy JSON document looks as follows. { "name": "Alice", "age": … Continue reading The fastest way to match characters on ARM processors?

Daniel Lemire's blog
A brief history of C/C++ programming languages

Initially, we had languages like Fortran (1957), Pascal (1970), and C (1972). Fortran was designed for number crunching and scientific computing. Pascal was restrictive with respect to low-level access (it was deliberately "safe", as meant for teaching structured programming). So C won out as a language that allowed low-level/unsafe programming (pointer arithmetic, direct memory access) … Continue reading A brief history of C/C++ programming languages

Daniel Lemire's blog
Can your AI rewrite your code in assembly?

Suppose you have several strings and you want to count the number of instances of the character ! in your strings. In C++, you might solve the problem as follows if you are an old-school programmer. size_t c = 0; for (const auto &str : strings) { c += std::count(str.begin(), str.end(), '!'); } You can … Continue reading Can your AI rewrite your code in assembly?

Daniel Lemire's blog