2 ms·
> Of course. But OTOH, we shouldn't immidiately discount LLs when writing code, just because the perf isn't optimal. Most of the time you should, I'd say. Rega
by staticassertion 10y ago
> Of course. But OTOH, we shouldn't immidiately discount LLs when writing code, just because the perf isn't optimal.
Most of the time you should, I'd say. Regardless, the decision should be very natural/ trivial for any developer - understanding the performance attributes of the most common data structures is not asking too much of developers.
> They trade speed for other that were, in the language designer's opinion, equally or more important than being fast.
Yes, of course. I am not advocating for highly tuned software - I've stated as much in the last post. There are often tradeoffs.
No one is arguing that a linked list is not more algorithmically efficient at certain things. What I will say is that Vectors still end up faster for most operations, and it shouldn't be hard for a developer to determine when those situations arise.
I am not arguing against LL. I am just saying that it isn't 'lunacy' to understand basic performance characteristics of your software. Your post essentially came off, at least to me, as "people are crazy for wanting ot use a more efficient data structure".
- qwertyuiop924 10y ago>I am not arguing against LL. I am just saying that it isn't 'lunacy' to understand basic performance characteristics of your software. It's not: it's very important. >Your post essentially came off, at least to me, as "people are crazy for wanting ot use a more efficient data structure". My point was more that people aren't necessarily crazy for using an LL. I don't, however, think that anybody is crazy for choosing not to use one for perf reasons. I guess what I'm saying is that AFAICT, we're entirely in agreement, and I have no idea why we thought we weren't.