Isaac Ferguson wrote:I need to sort object in an Array using minimum resources.
It should be done for 1 million objects. I dont want to use quickSort(), because it uses memory.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Isaac Ferguson wrote:The only functionality of the code is to tidyUp objects, in base of an attribute called counter. It should be able to hold 500.000 users simultaneously, from several different countries.
Every object has a path to one external image, and one external file with text....
Of course speed is very important else the user will get bored, and memory because it will be used mainly in mobile devices ....
In fact you probably wouldn't need to sort the data, or even keep it all in memory for that matter.
Isaac Ferguson wrote:A DB can be also an option
Isaac Ferguson wrote:Ok so I carry on with my DB solution, and I will check and optimize later...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Isaac Ferguson wrote:it is also a personal challenge to it as fast and compact as possible.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Don't get me started about those stupid light bulbs. |