this post was submitted on 10 Jul 2024
9 points (76.5% liked)

VS Code

776 readers
1 users here now

founded 1 year ago
MODERATORS
9
Sleep Sort (www.aprogrammerlife.com)
submitted 3 months ago by [email protected] to c/vscode
 

Time complexity isn't even associated to the size of the list. Amazing!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 3 months ago (1 children)

It's not O(1) though. There is still a normal sorting algorithm sorting this list, it's just inside the OS scheduler.

[โ€“] [email protected] 2 points 3 months ago

I didn't mean to imply that it was; I was referring to countless developers I've worked with over the years who thought hash maps were the fastest memory storage structure because they are generally O(1); they've mostly been ignorant of the fact that it's only true for sufficiently small values of "1".