acm-header
Sign In

Communications of the ACM

Blogroll


bg-corner

It is never too later to write your own C/C++ command-line utilities
From Daniel Lemire's Blog

It is never too later to write your own C/C++ command-line utilities

Recently, I received an email from an engineer at a prominent company who shared how he managed to save his employer tens of thousands of dollars annually by developing...

Replace strings by views when you can
From Daniel Lemire's Blog

Replace strings by views when you can

C++ programmers tend to represent strings using the std::string class. Though the implementation might vary, each instance of an std::string might use 32 bytes....

Compressing floating-point numbers quickly by converting them to brain floats
From Daniel Lemire's Blog

Compressing floating-point numbers quickly by converting them to brain floats

We sometimes have to work a large quantity of floating-point numbers. This volume can be detrimental to performance. Thus we often want to compress these numbers...

Parsing tiny and very large floating-point values: a programming-language comparison
From Daniel Lemire's Blog

Parsing tiny and very large floating-point values: a programming-language comparison

Most programming languages support floating-point numbers. You typically have the ability to turn a string into a floating-point number. E.g., “3.1416” could be...

Faster random integer generation with batching
From Daniel Lemire's Blog

Faster random integer generation with batching

We often generate random integers. Quite often these numbers must be within an interval: e.g., an integer between 0 and 100. One application is a random shuffle...

Reflection-based JSON in C++ at Gigabytes per Second
From Daniel Lemire's Blog

Reflection-based JSON in C++ at Gigabytes per Second

JSON (JavaScript Object Notation) is a popular format for storing and transmitting data. It uses human-readable text to represent structured data in the form of...

Converting ASCII strings to lower case at crazy speeds with AVX-512
From Daniel Lemire's Blog

Converting ASCII strings to lower case at crazy speeds with AVX-512

AMD Zen 4 and Zen 5, as well as server-side recent Intel processors, support an advanced set of instructions called AVX-512. They are powerful SIMD (Single Instruction...

Evolution of iPhone storage capacity
From Daniel Lemire's Blog

Evolution of iPhone storage capacity

People who should know better often underestimate how fast our storage capacity has grown. We have been able to get 1 TB of storage on iPhones for the last three...

Storage costs are plummeting
From Daniel Lemire's Blog

Storage costs are plummeting

Storage costs are plummeting like a skydiver in freefall—between 10 and 100 times cheaper with each passing decade. Meanwhile, the programmer population is growing...

How big are your docker images?
From Daniel Lemire's Blog

How big are your docker images?

Docker is a standard to deploy software on the cloud. Developers start with an existing image and add their own code before deploying their systems. How big are...

How much of your binary executable is just ASCII text?
From Daniel Lemire's Blog

How much of your binary executable is just ASCII text?

We sometimes use binary executable which can span megabytes. I wondered: how much text is contained in these binary files? To find out, I wrote a Python scriptContinue...

Safer code in C++ with lifetime bounds
From Daniel Lemire's Blog

Safer code in C++ with lifetime bounds

For better performance in software, we avoid unnecessary copies. To do so, we introduce references (or pointers). An example of this ideas in C++ is the std::string_view...

Does C++ allow template specialization by concepts?
From Daniel Lemire's Blog

Does C++ allow template specialization by concepts?

Recent versions of C++ (C++20) have a new feature: concepts. A concept in C++ is a named set of requirements that a type must satisfy. E.g., ‘act like a string’...

Scan HTML even faster with SIMD instructions (C++ and C#)
From Daniel Lemire's Blog

Scan HTML even faster with SIMD instructions (C++ and C#)

Earlier this year, both major Web engines (WebKit/Safari and Chromium/Chrome/Edge/Brave) accelerated HTML parsing using SIMD instructions. These ‘SIMD’ instructions...

Benchmarking ARM processors: Graviton 4, Graviton 3 and Apple M2
From Daniel Lemire's Blog

Benchmarking ARM processors: Graviton 4, Graviton 3 and Apple M2

The world of commodity processor is roughly divided in two: x64 chips for servers and PCs, and ARM processors for mobile devices. However, ARM chips increasingly...

Scan HTML faster with SIMD instructions: .NET/C# Edition
From Daniel Lemire's Blog

Scan HTML faster with SIMD instructions: .NET/C# Edition

Recently, the two major Web engines (WebKit and Chromium) adopted fast SIMD routines to scan HTML content. The key insight is to use vectorized classification (Langdale...

Performance tip: avoid unnecessary copies
From Daniel Lemire's Blog

Performance tip: avoid unnecessary copies

Copying data in software is cheap, but it is not at all free. As you start optimizing your code, you might find that copies become a performance bottleneck. Let...

Validating gigabytes of Unicode strings per second… in C#?
From Daniel Lemire's Blog

Validating gigabytes of Unicode strings per second… in C#?

We have been working on a fast library to validate and transcode Unicode and other formats such as base64 in C++: simdutf. We wondered: could we achieve the same...

Rolling your own fast matrix multiplication: loop order and vectorization
From Daniel Lemire's Blog

Rolling your own fast matrix multiplication: loop order and vectorization

If you must multiply matrices, you should use dedicated libraries. However, we sometimes need to roll our own code. In C++, you can quickly write your own Matrix...

Scan HTML faster with SIMD instructions: Chrome edition
From Daniel Lemire's Blog

Scan HTML faster with SIMD instructions: Chrome edition

Modern processors have instructions to process several bytes at once. Effectively all processors have the capability of processing 16 bytes one once. These instructions...
Sign In for Full Access
» Forgot Password? » Create an ACM Web Account