I'm wondering how toI could improve the speed of adding elements to my listlist's element-adding speed or just how to speed up the whole list implementation. Function which adds new elements
The adding function first checks if the object would beis unique. If not, it will just check if the new data is better (the lower the value, the better) thatthan the old one and, then swap the values or just skip adding an element.
I have no idea how to make it work faster, but I know that something here is probably done terribly wrong. I need to use that list to add about 3 milionmillion elements in less than 4 seconds. I enclose the code below: