2 ms·
I'm vaguely thinking set a TCP sequence number according to each number you want to sort, then use the out of order capability of TCP/IP to do it for you...
by perl4ever 7y ago
I'm vaguely thinking set a TCP sequence number according to each number you want to sort, then use the out of order capability of TCP/IP to do it for you...
- dan-robertson 7y agoBut you’d need to either send your million packets somewhere with enough memory (if you can do that, why not just send the numbers to the box with sufficient memory in the first place), and you’d need to be able to look at each input number and decide what sequence number to assign to the outgoing packet (you can’t use the number itself as numbers may be duplicated but seqnums may not, and you can’t have enough memory to know if it’s a duplicate without solving the problem. Also you won’t be able to have missing seqnums in the set of all packets you send, and wherever you send the packets won’t put up with you sending a million packets (let alone the 2^27 or so you might need if you sent every 8-digit number) out of order.