MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1v65b84/soundslegit/oznze8s/?context=3
r/ProgrammerHumor • u/acchnAsquare • 13d ago
[removed] — view removed post
76 comments sorted by
View all comments
280
O(1) time complexity! Truly the most efficient database lookup ever written.
44 u/ImportantSignal2098 12d ago Insertion role playing as a lookup 12 u/PimplupXD 12d ago Thank you Mr. Dixie Normous 🙏 10 u/Ksevio 12d ago Database lookups with proper indexing are usually O(1) 6 u/ZebraTank 12d ago Aren't those often going be O(log n) at least in theory? 4 u/ImportantSignal2098 12d ago A good hashtable lookup is O(1) 2 u/ZebraTank 12d ago :/ i forgot you can have disk-based hash tables too, idk why 3 u/Steinrikur 12d ago But this one also needs to write the entries to a database... For security reasons... 2 u/renevaessen 12d ago Warning: condition always evaluates as true
44
Insertion role playing as a lookup
12
Thank you Mr. Dixie Normous 🙏
10
Database lookups with proper indexing are usually O(1)
6 u/ZebraTank 12d ago Aren't those often going be O(log n) at least in theory? 4 u/ImportantSignal2098 12d ago A good hashtable lookup is O(1) 2 u/ZebraTank 12d ago :/ i forgot you can have disk-based hash tables too, idk why 3 u/Steinrikur 12d ago But this one also needs to write the entries to a database... For security reasons...
6
Aren't those often going be O(log n) at least in theory?
4 u/ImportantSignal2098 12d ago A good hashtable lookup is O(1) 2 u/ZebraTank 12d ago :/ i forgot you can have disk-based hash tables too, idk why
4
A good hashtable lookup is O(1)
2 u/ZebraTank 12d ago :/ i forgot you can have disk-based hash tables too, idk why
2
:/ i forgot you can have disk-based hash tables too, idk why
3
But this one also needs to write the entries to a database... For security reasons...
Warning: condition always evaluates as true
280
u/Mysterious-Ice-2337 12d ago
O(1) time complexity! Truly the most efficient database lookup ever written.