4 ms·
Yes. The OP's post is basically "baby's first API." The are a very handy API but relying on them at scale is much less efficient than structs or arrays. This po
by my_new_account0 3y ago
Yes. The OP's post is basically "baby's first API." The are a very handy API but relying on them at scale is much less efficient than structs or arrays. This post doesn't even go into the different performance characters of these APIs, which can be a major foot gun.
I've noticed a lot of novice-level posts on here lately. Although I admit the post was very well written.
- ceautery 3y agoNovice level posts are great. Someone found something exciting to them, not new to us, but we should encourage them to keep exploring and writing.
- schrodinger 3y agoAlso, the votes imply interest!
- dikei 3y agoI find it funny that he said he didn't know what to pick between 5 types of IDictionary in C#. * Hashtable * SortedList * SortedList<TKey, TValue> * Dictionary<TKey, TValue> * ConcurrentDictionary<TKey, TValue> I don't even know C# (just Java), yet I know that you'd probably want to use Dictionary<TKey, TValue> most of the time.
- software_writer 3y agoTo be honest, I wrote that just to add a little drama ;)
- djur 3y agoMy experience is that Struct only performs better than Hash in a pretty narrow set of circumstances, rarely enough to be a deciding factor unless profiling suggests it to be.
- Glyptodon 3y agoRuby structs or c-family structs?