Uninitialized Memory In Arrays

This is a really neat trick that has been around for over 30 years. With an array, you can leave values uninitialized and then read during normal operation and your code will work properly no matter what junk data is in the array. I may try to implement this using C or Perl just for fun. If you want to read more about how it works and what the arrays look like check out the full article below.

Using Uninitialized Memory for Fun and Profit (research.swtch.com)

Written on January 6, 2011