Re: Optimizing basic operations
- Posted by James_at_Euphoria Aug 02, 2013
- 5905 views
jaygade said...
Let me see if I understand your problem so far:
- Receive a data structure containing an evaluation and two lists of 25 integers. The evaluation is the result of some calculation.
- Add the data to a list, keeping the list sorted by the value of evaluation as the data are received sequentially.
- The list can grow to a very large size.
It would be better to say that the list could grow to a very large size. The minimum size is the top 100 + 1. The maximum would be the top 100 + n, where n is limited by memory. After sorting 100 + 1 or 100 + n, then create the new top 100.