BlogFeatured 3 times
lemire.me
Latest independent writing from lemire.me.
Recent posts
Newest first- Our textbook on machine learning and artificial intelligence is out
Introduction to Machine Learning and Artificial Intelligence with Python is a 741-page textbook emphasizing practical implementation using NumPy, Pandas, and PyTorch.
- Command-line JSON filtering at 20 GB/s
The sjq command-line tool leverages simdjson to process JSON data significantly faster than jq, achieving up to 20 GB/s with multithreading.
- Seeing the machine code of your Java program, with a few lines of Java
A new Java library called instructive allows developers to see the machine code produced by the JIT compiler for performance analysis.
- Decoding base64 email attachments: a speed ranking of programming languages
A benchmark ranks programming languages by speed decoding MIME base64, with C++ and PHP showing significant improvements using SIMD instructions.
- Java4Shell: when base64 decoding leads to remote code execution?
A bug in OpenJDK's Base64 decoder, introduced in June 2021, can lead to remote code execution by writing past the end of an array.
- Cognitive radius
AI expands a software engineer's cognitive radius, enabling them to hold and operate on a larger set of projects and information simultaneously.
- Reading JSON at 277 GB/s in Python
Reading and processing JSON data in Python can be significantly accelerated using libraries like fastsimdjson, achieving speeds up to 277 GB/s by parsing records on multiple threads.
- Telling your number parser what to expect
The fast_float library introduces performance hints to optimize number parsing by providing information about data characteristics to the processor.
- A performance trap: when store forwarding fails
Store forwarding fails when a load is wider than a store or ranges overlap, causing the load to wait until the store reaches the cache.
- Open source as a research method
Open source development, exemplified by simdjson and simdutf, drives research by addressing real-world problems and fostering collaboration through community contributions and code reviews.
- In C++, = default and {} are not the same constructor
In C++, declaring a default constructor with = default versus {} can significantly impact performance due to differences in triviality and initialization.
- Beating the compiler at signed 32-bit division
Signed 32-bit integer division on 64-bit processors can be optimized using a 33-bit multiplier, potentially outperforming compiler-generated code.
- Billion-query-per-second lookup tables in C++
This C++ library implements compile-time perfect hashing for string lookups, achieving billion-query-per-second performance with optimized string comparisons.
- Decoding base64 in Python at 10 gigabytes per second
The fastpybase64 Python module offers a drop-in replacement for the standard base64 module, achieving significantly faster decoding speeds.
- Redis now has compressed bitmaps (Roaring)
Redis 8.12 will introduce support for Roaring compressed bitmaps, offering potential space and speed improvements for sparse integer sets.
- Parsing JSON at tens of gigabytes per second… in Python
Python's free-threaded 3.14t version enables parsing 7.6 GB of JSON data at 66 GB/s using fastsimdjson with lazy views.
- WebSocket servers in JavaScript: Node.js, Bun and Deno in 2026
A benchmark compares Node.js, Bun, and Deno WebSocket servers using uWebSockets.js and the ws package, revealing Node.js with uWebSockets.js as the fastest.
- Faster Python startup with lazy imports
Python's upcoming version introduces lazy imports, allowing modules to be loaded only when used, significantly speeding up program startup times for certain operations.
- Mastering SIMD with Java Vector API
Mastering SIMD with Java Vector API explores how Java programmers can leverage data parallelism for performance gains by optimizing common programming problems.
- Faster software linking with mold
The mold linker, a drop-in replacement for GNU ld, offers significantly faster software linking times, especially with multithreading.
- Ephemeral testing
Ephemeral testing proposes using AI agents to build and test applications on top of your code, assessing the quality of the new software rather than the original work directly.
- Parsing compressed JSON at 40 GB/s
Processing compressed NDJSON files using simdjson and zstd with multiple frames achieves 40 GB/s speeds on multi-core servers.
- Transcoding UTF-8 to UTF-16 with replacement at gigabytes per second
The simdutf library now supports transcoding invalid UTF-8 sequences to UTF-16 by replacing them with the U+FFFD character.
- simdjson 5.0 is out
Simdjson 5.0 introduces officially supported C++26 static reflection, compile-time key selectors for efficient JSON field extraction, and enhanced stream parsing capabilities.
- How fast can you fix a UTF-16 string in C#?
C# now offers SIMD-accelerated functions to fix ill-formed UTF-16 strings, mirroring JavaScript's capabilities for improved performance.
- How many strings can you create per second?
C++ std::to_string leads in creating millions of strings per second, outperforming JavaScript, Go, Rust, and Python due to small string optimization.
- A summer of AI optimization
Several widely used open-source libraries experienced significant performance improvements in 2026, largely attributed to AI-assisted optimization techniques.
- More than a taken branch per cycle?
Modern processors, including AMD Zen 5, Apple M4 Max, and Granite Rapids, can execute more than one taken branch per cycle under specific conditions.
- The data does not show mass unemployment
Data from 2025 indicates that the USA had a higher percentage of software developers than in 2021, with average salaries also slightly increasing.
- AI is breaking the academic sorting machine
Agentic AI is disrupting academic sorting mechanisms by enabling individuals to produce advanced research outputs, challenging traditional evaluation systems.
- Faster JSON parsing with SVE2 on ARM processors
The simdjson library's character classification for JSON parsing is being updated to leverage ARM's SVE2 match instruction for improved performance.
- How fast is C++23’s std::flat_map?
C++23's std::flat_map, a sorted vector of keys and values, offers performance benefits over std::map for lookups and bulk operations, but struggles with random insertions.
- Subnormal floating-point numbers are expensive… on Intel processors
Subnormal floating-point numbers significantly slow down computations on Intel processors, but not on AMD or ARM chips.
- The four-colour theorem was only the start
Influential mathematicians express concern that AI's success in solving complex problems threatens conceptual understanding and proper attribution in the field.
- A quick overview of atomics in C
C11 threads and atomic variables offer ways to manage shared memory and prevent data races in concurrent programming.