deltaci

Joined 5 years ago

Karma
64
Submissions
17
Member since
Mar 1
[XnZBvjpQ3R]
View on Hacker News

Recent submissions

Comment · 3 years ago
Comment · 3 years ago
this is already the third time github actions is down this week at wednesday morning
Comment · 4 years ago
Comment · 4 years ago
Comment · 4 years ago
Estonia is also a really good choice within EU. With their digital residency card, everything can be managed online with digital signatures only.
Comment · 4 years ago
this is very naive reimplentation of the C# version. I managed to reduce the runtime of the same file from 5.7 seconds to just 800ms

    using var file = File.OpenRead("file.bin");
    var counter = 0;
    var sw = Stopwatch.StartNew();
    var buf = new byte[4096];
    while (file.Read(buf,0,buf.Length) > 0)
    {
        foreach (var t in buf)
        {
            if (t == '1')
            {
                counter++;
            }
        }
    }

    sw.Stop();
    Console.WriteLine($"Counted {counter:N0} 1s in {sw.Elapsed.TotalMilliseconds:N4} milliseconds");
Comment · 4 years ago
You just need to do File.OpenRead instead of OpenText to get a FileStream, then you can read the buffer
Comment · 4 years ago
but it makes function calls, it's not neglectable as it's called as many time as the bytes the file has
Comment · 4 years ago
Comment · 4 years ago
most of the latency comes from network layer. my naiive guess is they probably switched from a standard ethernet setup to a infiniband setup to achieve 600us of total latency.
Comment · 4 years ago
Comment · 5 years ago
Even the status page is down for me. Please don't host your status page in same network/domain.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton