Skip to main content
2 events
when toggle format what by license comment
Dec 19, 2018 at 19:09 comment added Delioth Why on earth would that be a search - it's a value-index conversion. For an integer, index(v) is literally x => return x, more generally it's taking a thing and directly finding a sortable value of that thing (usually, probably a property access - x.getId() or whatever). That function should be O(1) in most cases. It'd only be a search if you already had a sorted list to know where it should go.
Dec 19, 2018 at 10:37 history answered Pieter B CC BY-SA 4.0