Daniel Lemire's blog

Science and Technology links (September 28th 2019)

, 1 min read

Researchers have effectively rejuvenated the damaged skin of mice by using “exosomes”. These are packages that cells send in their environment, and it appears that other cells react positively to exosomes in some conditions. The therapy is non-invasive (no needle!) and it appears to be…

Science and Technology links (September 21st 2019)

, 1 min read

Amputees suffer from lack of sensory feedback from the missing limbs. Researchers found it beneficial to provide artificial sensory feedback. More economically equal societies favor people with better genes, something referred to as the Gene-Gini interplay. As we age, we tend to accumulate…

How far can you scale interleaved binary searches?

, 3 min read

The binary search is the standard, textbook, approach when searching through sorted arrays. In a previous post, I showed how you can do multiple binary searches faster if you interleave them. The core idea is that while the processor is waiting for data from one memory access, you can squeeze in…

My kindergarten story

, 2 min read

Though I was a straight-A student for most of my high school and college years, I failed kindergarten. I have told this story many times but I realize that I have never dedicated a blog post to it. I ended up with a PhD from a top Canadian university and some of my research as an academic has been…

Science and Technology links (September 14th 2019)

, 1 min read

Streaming music makes up 80% of the revenue of the music industry. Revenue is up 18% for the first six months of 2019. This follows a record year in 2018 when the music industry reached its highest revenues in 10 years. Though it should be good news for musicians, it is also the case that record…

Speeding up independent binary searches by interleaving them

, 5 min read

Given a long list of sorted values, how do you find the location of a particular value? A simple strategy is to first look at the middle of the list. If your value is larger than the middle value, look at the last half of the list, if not look at the first half of the list. Then repeat with select…

Science and Technology links (September 7th 2019)

, 3 min read

In a small clinical trial, scientists administered some “anti-aging” therapies to people between their fifties and sixties. They used growth hormone to regenerate the thymus, part of our immune system which is nearly all gone when people reach 50 years old. They complemented this therapy with…

Passing integers by reference can be expensive…

, 3 min read

In languages like C++, you can pass values to functions in two ways. You can pass by value: the value is semantically “copied” before being passed to the function. Any change you made to the value within the function will be gone after the function terminates. The value is ephemeral. You can…

Science and Technology links (August 31st 2019)

, 1 min read

The Conboy laboratory in Berkeley is responsible for some of the best work in aging research. In 2005, they showed that by connecting the blood vessels of an old and a young mice, they could rejuvenate the old mice (via a process called parabiosis). This earlier work showed that there are probably…

How fast can scancount be?

, 3 min read

In an earlier post, I described the following problem. Suppose that you have tens of arrays of integers. You wish to find all integer that are in more than 3 (say) of the sets. This is neither a union nor an intersection. A simple algorithm to solve this problem is to use a counter for each…

Science and Technology links (August 24th 2019)

, 1 min read

The net contribution of the Amazon ecosystem to the world’s oxygen is effectively zero. Furthermore, there is a lot of oxygen in the air and it would be excessively difficult to lower or increase the ratio. In effect, we are not going to run out of oxygen on Earth any time soon, even if we tried…

Science and Technology links (August 17th 2019)

, 1 min read

Google may soon release an augmented-reality version of Google Maps for mobile phones. I have always found it difficult to identify the streets I see in an unfamiliar setting, and it looks like Google may be solving this very problem. I am looking forward to seeing how well it works in…

Faster threshold queries with cache-sensitive scancount

, 2 min read

Suppose that you are given 100 sorted arrays of integers. You can compute their union or their intersection. It is a common setup in data indexing: the integers might be unique identifiers. But there is more than just intersections and unions… What if you want all values that appear in more than…

Science and Technology links (August 10th 2019

, 2 min read

A short (less than one hour) online lesson improved grades among weaker students. The lesson taught the growth mindset: that intellectual abilities can be developed. The chip maker AMD, has released a processor (EPYC 7742) which has 32-billion transistors and 64 cores. According to a recent…

Science and Technology links (August 3rd 2019)

, 1 min read

Reportedly, researchers in China are creating embryos that are part human and part monkey. Sickle cell disease is a genetic disease with no cure. In an attempt to cure the disease, a patient received gene therapy. We still do not know whether it will work. Scientists theorize that chronic…

JSON parsing: simdjson vs. JSON for Modern C++

, 1 min read

JSON is the ubiquitous data format on the Internet. There is a lot of JSON that needs to be parsed and validated. As we just released the latest version of our fast JSON parser (simdjson), a reader of this blog asked how it compared in speed against one of the nicest C++ JSON libraries: JSON for…