acm-header
Sign In

Communications of the ACM

Blogroll


bg-corner

Science and Technology links (December 25 2022)
From Daniel Lemire's Blog

Science and Technology links (December 25 2022)

One of Elon Musk’s ventures, OpenAI, made public a new tool called ChatGPT. It is widely regarding as a practical breakthrough in artificial intelligence. Given...

Fast base16 encoding
From Daniel Lemire's Blog

Fast base16 encoding

Given binary data, we often need to encode it as ASCII text. Email and much of the web effectively works in this manner. A popular format for this purpose is base64...

The size of things in bytes
From Daniel Lemire's Blog

The size of things in bytes

storing 1 GiB/month on the cloud 0.02$US web site of my twitter profile (@lemire), HTML alone 296 KiB web site of my twitter profile (@lemire), all data 3.9 MiB...

Checking for the absence of a string, naive AVX-512 edition
From Daniel Lemire's Blog

Checking for the absence of a string, naive AVX-512 edition

Suppose you would like to check that a string is not present in a large document. In C, you might do the following using the standard function strstr: bool is_present...

What is the memory usage of a small array in C++?
From Daniel Lemire's Blog

What is the memory usage of a small array in C++?

In an earlier blog post, I reported that the memory usage of a small byte array in Java (e.g., an array containing 4 bytes) was about 24 bytes. In other words:Continue...

Science and Technology links (December 11 2022)
From Daniel Lemire's Blog

Science and Technology links (December 11 2022)

As we focus on some types of unfortunate discrimination (race, gender), we may become blind to other types of discrimination. For example, tend to discrimate against...

Fast midpoint between two integers without overflow
From Daniel Lemire's Blog

Fast midpoint between two integers without overflow

Let us say that I ask you to find the number I am thinking about between -1000 and 1000, by repeatedly guessing a number. With each guess, I tell you whether your...

Optimizing compilers reload vector constants needlessly
From Daniel Lemire's Blog

Optimizing compilers reload vector constants needlessly

Modern processors have powerful vector instructions which allow you to load several values at once, and operate (in one instruction) on all these values. Similarly...

How big are your SVE registers ? (AWS Graviton)
From Daniel Lemire's Blog

How big are your SVE registers ? (AWS Graviton)

Amazon has some neat ARM-based systems based on Amazon’s own chips (Graviton). You can access them through Amazon’s web services (AWS). These processors have advanced...

Generic number compression (zstd)
From Daniel Lemire's Blog

Generic number compression (zstd)

I have done a lot of work that involves compressing and uncompressing data. Most often, I work on data that has specific characteristics, e.g., sorted integers....

Science and Technology links (November 26 2022)
From Daniel Lemire's Blog

Science and Technology links (November 26 2022)

Molière’s famous play, Tartuffe, the main characters is outwardly pious but fundamentally deceitful. Are people who insist on broadcasting their high virtue better...

Making all your integers positive with zigzag encoding
From Daniel Lemire's Blog

Making all your integers positive with zigzag encoding

You sometimes feel the need to make all of your integers positive, without losing any information. That is, you want to map all of your integers from ‘signed’ integers...

What is the size of a byte[] array in Java?
From Daniel Lemire's Blog

What is the size of a byte[] array in Java?

Java allows you to create an array just big enough to contain 4 bytes, like so: byte[] array = new byte[4]; How much memory does this array take? If you have answered...

Rounding modes: std::from_chars versus strtod/strtof
From Daniel Lemire's Blog

Rounding modes: std::from_chars versus strtod/strtof

A recent C++ standard (C++17) introduced new functions to parse floating-point numbers std::from_chars, from strings (e.g., ASCII text) to binary numbers. How should...

A fast function to check your floating-point rounding mode
From Daniel Lemire's Blog

A fast function to check your floating-point rounding mode

For speed, we use finite-precision number types in software. When doing floating-point computations in software, the results are usually not exact. For example,...

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...
Sign In for Full Access
» Forgot Password? » Create an ACM Web Account