Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Yes, PHP is faster than C#. Parent comment
My C# is very rusty (no pun intended) but I would guess the core of the program could be something like
File.ReadAllBytes("file.bin").Where(x => x == '1').Count()
There are no comments on this comment yet.
My C# is very rusty (no pun intended) but I would guess the core of the program could be something like
And nitpick: the code you gave has a bug. file.Read can return less than 4096. If so, you should only loop over the part of the buffer it filled.