Get the latest tech news
Make your program slower with threads (2014)
, while taking a numerical methods course, I wrote some code to calculate the expected number of shared birthdays in a group. The code is very simple: each attempt constructs a vector of N birthdays, then counts the duplicates.
Years ago, while taking a numerical methods course, I wrote some code to calculate the expected number of shared birthdays in a group. The outer loop runs millions of attempts, and calculates the mean number of shared birthdays across all the samples. At worst, it’s tempting to think, these things count as a non-parallel portion of code and lower the maximum achievable parallel speedup.
Or read this on Hacker News