3 ms·
I work on a high performance system which needs to handle lots of concurrency of requests with various possible scenarios. In order to efficiently time out req
by Peaker 13y ago
I work on a high performance system which needs to handle lots of concurrency of requests with various possible scenarios.
In order to efficiently time out requests, need to have the requests sit in a chronological list. But they also need to be quickly found by other orderings, so they also sit in hash tables.
When a request is complete, I need to efficiently delete it from all these structures.
Using ptr arrays rather than lists would be catastrophic for our performance.
There is virtually no advantage whatsoever to the array approach over the list approach in our case and in many others.