Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Arrays proven once again the ultimate data structure

Name: Anonymous 2016-08-24 9:33

https://jackmott.github.io/programming/2016/08/20/when-bigo-foolsya.html
Bonus:For loops are faster by considerable margin than everything else.

Name: Anonymous 2016-08-24 17:46

>>1
when hardware optimizes for arrays...

Name: Anonymous 2016-08-24 19:16

For imperative dogs perhaps, but you can almost always find a better structure for the task at hand to reduce the number of operations even necessary instead of just making traversal faster.

Name: Anonymous 2016-08-25 2:27

>>20
Yes, if you are loading data into memory and already know the size, and will only be reading from that or making changes that don't alter the size of any element, arrays are great. But almost anything else has a better data structure available. For example, if you will be doing lots of searching, you should use a sort of self-balancing tree. The O(lg(n)) worst case time complexity will save a lot of time more than the time that saved by having the data block in the cache.

And the whole thing falls apart when storing variable length things like strings anyway, since they still have to be dereferenced. Speaking of strings, I don't see why you imperative subniggers bitch about Lisp here, Huskull is the one that stores strings as linked lists.

Name: Anonymous 2016-08-25 20:58

Using arrays destroys your flexibility and therefore scalability. The only time it's useful is when there's a fixed known size.

Name: Anonymous 2016-08-25 22:54

>>27
Arrays are the least scalable data structure. You have to destroy or mutate the entire thing to perform many simple processing steps. Arrays mean they're contiguous and that it all needs to fit in RAM. It's lots of fun when you get some massive file you need to process and array-based garbage starts swap thrashing or dies from OoM.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List