acm-header
Sign In

Communications of the ACM

Blogroll


bg-corner

Measuring the memory usage of your C++ program
From Daniel Lemire's Blog

Measuring the memory usage of your C++ program

In C++, we might implement dynamic lists using the vector template. The int-valued constructor of the vector template allocates at least enough memory to storeContinue...

Modern vector programming with masked loads and stores
From Daniel Lemire's Blog

Modern vector programming with masked loads and stores

When you start a program, it creates a ‘process’ which own its memory. Memory is allocated to a software process in blocks called ‘pages’. These pages might span...

Book Review : Template Metaprogramming with C++
From Daniel Lemire's Blog

Book Review : Template Metaprogramming with C++

I have spent the last few years programming often in C++. The C++ langage is probably one of the hardest to master. I still learn something new every week. Furthermore...

Science and Technology links (October 16 2022)
From Daniel Lemire's Blog

Science and Technology links (October 16 2022)

Doctors in Israel are toying with polygenic screening: it is a way to make it more likely that your baby will grow up to be healthy. In 2021, 337 million prescriptions...

The number of comparisons needed to sort a shuffled array: qsort  versus std::sort
From Daniel Lemire's Blog

The number of comparisons needed to sort a shuffled array: qsort versus std::sort

Given an array of N numbers of type double, the standard way to sort it in C is to invoke the qsort function qsort(array, N, sizeof(double), compare); where compare...

A review of elementary data types : numbers and strings
From Daniel Lemire's Blog

A review of elementary data types : numbers and strings

Computer programming starts with the organization of the data into data structures. In almost all cases, we work with strings or numbers. It is critical to understand...

Optimizing compilers deduplicate strings and arrays
From Daniel Lemire's Blog

Optimizing compilers deduplicate strings and arrays

When programming, it can be wasteful to store the same constant data again and again. You use more memory, you access more data. Thankfully, your optimizing compiler...

Science and Technology links (September 16 2022)
From Daniel Lemire's Blog

Science and Technology links (September 16 2022)

Attractive female students get better grades. They lose this benefit when courses move online. A research paper is much more likely to be highly ranked if the author...

Escaping strings faster with AVX-512
From Daniel Lemire's Blog

Escaping strings faster with AVX-512

When programming, we often have to ‘escape’ strings. A standard way to do it is to insert the backslash character (\) before some characters such as the doubleContinue...

Science and Technology links (September 12 2022)
From Daniel Lemire's Blog

Science and Technology links (September 12 2022)

A standard dataset in artificial-intelligence research has ten percent of its images mislabeled. Yet state-of-the-art algorithms achieve better-than-90% classification...

Catching sanitizer errors programmatically
From Daniel Lemire's Blog

Catching sanitizer errors programmatically

The C and C++ languages offer little protection against programmer errors. Errors do not always show up where you expect. You can silently corrupt the content of...

“Hello world” is slower in C++ than in C (Linux)
From Daniel Lemire's Blog

“Hello world” is slower in C++ than in C (Linux)

A simple C program might print ‘hello world’ on screen: #include <stdio.h> #include <stdlib.h> int main() { printf("hello world\n"); return EXIT_SUCCESS; } YouContinue...

Science and Technology links (August 7 2022)
From Daniel Lemire's Blog

Science and Technology links (August 7 2022)

Increase in computing performance explain up to 94% of the performance improvements in field such as weather prediction, protein folding, and oil exploration: information...

Comparing strtod with from_chars (GCC 12)
From Daniel Lemire's Blog

Comparing strtod with from_chars (GCC 12)

A reader (Richard Ebeling) invited me to revisit an older blog post: Parsing floats in C++: benchmarking strtod vs. from_chars. Back then I reported that switching...

Round a Direction Vector to an 8-Way Compass
From Daniel Lemire's Blog

Round a Direction Vector to an 8-Way Compass

Modern game controllers can point in a wide range of directions. Game designers sometimes want to convert the joystick direction to get 8-directional movement.Continue...

Science and Technology links (July 23rd 2022)
From Daniel Lemire's Blog

Science and Technology links (July 23rd 2022)

Compared to 1800, we eat less saturated fat and much more processed food and vegetable oils and it does not seem to be good for us: Saturated fats from animal sources...

Negative incentives in academic research
From Daniel Lemire's Blog

Negative incentives in academic research

In the first half of the XXth century, there were relatively few scientists, and these scientists were generally not lavishly funded. Yet it has been convincingly...

How quickly can you convert floats to doubles (and back)?
From Daniel Lemire's Blog

How quickly can you convert floats to doubles (and back)?

Many programming languages have two binary floating-point types: float (32-bit) and double (64-bit). It reflects the fact that most general-purpose processors supports...

Filtering numbers faster with SVE on Graviton 3 processors
From Daniel Lemire's Blog

Filtering numbers faster with SVE on Graviton 3 processors

Processors come, roughly, in two large families x64 processors from Intel and AMD, and ARM processors from Apple, Samsung, and many other vendors. For a long time...

Go generics are not bad
From Daniel Lemire's Blog

Go generics are not bad

When programming, we often need to write ‘generic’ functions where the exact data type is not important. For example, you might want to write a simple functionContinue...
Sign In for Full Access
» Forgot Password? » Create an ACM Web Account