logoalt Hacker News

hinkleyyesterday at 12:29 AM1 replyview on HN

I don’t think I can agree to ignore the latency problem. Intermachine Latency is the source of a cube root of N term.


Replies

Dylan16807yesterday at 2:14 AM

Once you start receiving data in bulk, the time it takes is quantity of data divided by your connection speed. Latency doesn't factor in.

Technically you need to consider the time it takes to start receiving data. Which would mean your total time is O(n + ∛n). Not O(n * ∛n). But not all nodes are ∛n away. The closest nodes are O(1) latency. So if you start your scan on the close nodes, you will keep your data link saturated from the start, and your total time will be O(n). (And O(n + ∛n) simplifies to O(n) anyway.)