3 ms·
You are absolutely right on the fact that it doesn't, but I have seen plenty of people claim that high-level languages absolve you from having to think about me
by Coding_Cat 12y ago
You are absolutely right on the fact that it doesn't, but I have seen plenty of people claim that high-level languages absolve you from having to think about memory.
Wikipedia says:
>"[High level languages] may [...] automate (or even hide entirely) significant areas of computing systems (e.g. memory management)"
And I think most people who make such claims have read similar statements and simply confuse memory-management with thinking about memory issues. (The distinction is that well defined anyway).
- MichaelGG 12y agoThis isn't a case of a memory management issue. It's a case of someone using an O(n) algorithm instead of O(1). There's not a memory layout that would change this. Even if you used an array, if you iterated over it, it'd still be rather expensive. This is also what abstractions are for. Instead of killing your perf by using an unsuitable data structure, implement the same interface, but with a fast implementation. Using linked list for this scenario seems suboptimal.