mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-21 12:29:43 -10:00
A playlist keeps its entries with room before the first, so a push takes the slot there instead of moving every entry up one; when there is none, the entries move into an allocation with as much room again before them. A full playlist still drops its last entry, and cannot fail for want of memory: with no room to be had its entries move up over the last as before. Order, eviction and what is written are unchanged. A scan adding 50000 entries spends about 0.17 s on its pushes rather than 5.4 s. playlist_parity_test checks pushes, unchecked pushes, pushes of entries already there, deletes and clears against a list kept beside them, on a loaded playlist at a capacity that evicts and on one grown to 4095 entries.