Subscribe: Daniel Lemire's blog
http://www.daniel-lemire.com/blog/wp-rss2.php
Preview: Daniel Lemire's blog

Daniel Lemire's blog



Daniel Lemire is a computer science professor at the University of Quebec (Canada). His research is focused on software performance and data engineering. He is a techno-optimist.



Last Build Date: Wed, 21 Feb 2018 03:58:26 +0000

 



Iterating over set bits quickly

Wed, 21 Feb 2018 03:58:26 +0000

A common problem in my line of work is to iterate over the set bits (bits having value 1) in a large array. My standard approach involves a “counting trailing zeroes” function. Given an integer, this function counts how many consecutive bits are zero starting from the less significant bits. Any odd integer has no … Continue reading Iterating over set bits quickly



Science and Technology links (February 16th, 2018)

Sat, 17 Feb 2018 00:40:26 +0000

In all countries, in all years–without exception–girls did better than boys in academic performance (PISA) tests. Vinod Khosla said: There are, perhaps, a few hundred sensors in the typical car and none in the body. A single ad shown to you on Facebook has way more computing power applied to it than a $10,000 medical … Continue reading Science and Technology links (February 16th, 2018)



Science and Technology links (February 9th, 2018)

Sat, 10 Feb 2018 00:23:20 +0000

We shed 50 million skin cells every day. A mutant crayfish reproduces by cloning. To my knowledge, this might be the largest animal to reproduce by cloning. Before about 25 years ago, the species simply did not exist (…) it has spread across much of Europe and gained a toehold on other continents. In Madagascar, … Continue reading Science and Technology links (February 9th, 2018)



Don’t underestimate the nerds

Mon, 05 Feb 2018 21:57:41 +0000

I’m a little nerdy. According to my wife, I even look like a nerd. I am not very big. I have a long resume posted online, and I’ll proudly post my follower count, but if you meet me in person, I am unlikely to come across as “impressive”. I don’t talk using “big words”. I … Continue reading Don’t underestimate the nerds



Science and Technology links (February 2nd, 2018)

Fri, 02 Feb 2018 04:33:55 +0000

Most mammals, including human beings, age according to a Gompertz curve. It is a fancy way of saying that your risk of death goes up exponential with age. Naked mole rats are mammals that do not age, in the following sense: unlike all other mammals studied to date, and regardless of sex or breeding-status, the … Continue reading Science and Technology links (February 2nd, 2018)



Picking distinct numbers at random: benchmarking a brilliant algorithm (JavaScript edition)

Wed, 31 Jan 2018 20:05:34 +0000

Suppose you want to choose m distinct integers at random within some interval ([0,n)). How would you do it quickly? I have a blog post on this topic dating back to 2013. This week I came across Adrian Colyer’s article where he presents a very elegant algorithm to solve this problem, attributed to Floyd by … Continue reading Picking distinct numbers at random: benchmarking a brilliant algorithm (JavaScript edition)



Science and Technology links (January 26th, 2018)

Fri, 26 Jan 2018 01:10:17 +0000

We have reached “peak coal” meaning that coal usage is going to diminish in the coming years. McGill professor Ishiang Shih has been accused by the US government of leaking chip designs to the Chinese government. The professor runs a business called JYS Technologies. This sounds impressive and mysterious until you check out the company … Continue reading Science and Technology links (January 26th, 2018)



Initializing arrays quickly in Swift: be wary of Sadun’s initializers

Tue, 23 Jan 2018 16:16:29 +0000

Swift is Apple’s go-to programming language. It is the new default to build applications for iPhones. It also runs well on Linux. It is not as low-level as C or C++, but it has characteristics that I like. For example, it does not use a “fancy” garbage collector, relying instead on deterministic reference counting. It … Continue reading Initializing arrays quickly in Swift: be wary of Sadun’s initializers



Microbenchmarking is hard: virtual machine edition

Sun, 21 Jan 2018 01:25:51 +0000

To better understand software performance, we often use small controlled experiments called microbenchmarks. In an earlier post, I remarked that it is hard to reason from a Java benchmark. This brought me some criticism from Aleksey Shipilëv who is one of the top experts on Java benchmarking. I still stand by my belief and simply … Continue reading Microbenchmarking is hard: virtual machine edition



Science and Technology links (January 19th, 2018)

Fri, 19 Jan 2018 18:08:07 +0000

The Raspberry Pi 3, a $15-dollar computer that I use for various fun projects, is 15 times more powerful than the Cray-1 supercomputer, but it is 130,000 times lighter. The Cray-1 was worth $9 million in 1977. (Source: Joe Armstrong‏) Stem cells can be used to replace or modify the behavior of our own cells. … Continue reading Science and Technology links (January 19th, 2018)