3 ms·
This implementation is O(n) on retrieval, rather than O(1) as in the ideal case. Hopefully v2 will optimize that in the near future.
by xxpor 6y ago
This implementation is O(n) on retrieval, rather than O(1) as in the ideal case. Hopefully v2 will optimize that in the near future.
- deleted 6y ago[deleted]
- nicolashahn 6y agoI think the next version, Shitplate, should have this improvement. Space complexity is worse, though.
- ThePadawan 6y agoI am a competitor of Shitbowl, and my product ("Shitdrawer") solves this issue!
- schmorptron 6y agoHowever, while it's true that your product is O(1) even in the worst case, when you look closer it's actually O(1) + O(1) even in the best case, as you have to open the Shitdrawer to even get the the most recently used item. Do you have any solution to this?
- sdenton4 6y agoShitfloor?
- james_pm 6y agoMy kids already invented that. If you want theirs, come ask. Includes unlimited eye rolls and muttering.
- ThePadawan 6y agoI would recommend not looking closer!
- drran 6y agoO(1)+O(1) is just O(11). Not a big problem.
- zikzak 6y agoI used to love this product but after a few weeks it started to only make the first 15% of the items available. You then have to use elevated permissions to remove the cached items directly behind these which sometimes results in damage to the items or the operator. Please fix this or I'm going to lower my rating.
- james_pm 6y agoShitdrawer is the Amazon Glacier of Shitbowl. Easy to throw stuff in, generally it stays there very long term.
- sgtnoodle 6y agoShitdrawer also has a more compelling security model, although to be honest shitbowl is more convenient and most people think firewalls are good enough whether or not they have tons of easily opened ports.
- gnfargbl 6y agoIt is true that it is theoretically O(n) in the worst case, but in my own production deployments I have tended to find a huge skew towards selecting the most recently inserted couple of items. Here the obvious ocular caching optimization leads to O(1) time retrieval.
- harlanji 6y agoThat’s right. This system has a high hit rate baked in, based on matching the data structure to the real world usage with a predictable set of content classes. Very elegant.
- chapium 6y agoO(1) implementation is trivial and implemented by most teenagers bedroom floors.
- sgtnoodle 6y agoIt depends on how good the hash algorithm is. My 2 year old's method tends to have a lot of collisions near the book shelf and the play kitchen, and I'm starting to think it's nondeterministic...