Hacker News new | ask | show | jobs
by spenczar5 776 days ago
But it seems consequential. If the time were sampled every kilobyte, the code would be 1,000 times faster - which is better than the proposed use of other time functions.

At that point, even these slow methods are using about 0.5ms per million bytes, so it should be good up to gigabit speeds.

If that’s not fast enough, then sample every million bytes. Or, if the complexity is worth it, sample in an adaptive fashion.