2 ms·
Your comment still doesn't make sense, even though you decided to choose a certain ADS and then latee decide on the implementation later based on empirical perf
by gnulinux 8y ago
Your comment still doesn't make sense, even though you decided to choose a certain ADS and then latee decide on the implementation later based on empirical performance data, this is still not unusual. For (1) this is not how people write C. There are ADS libraries in C with which you wouldn't need need to use any DS that you can't change but this is not a usual way to write C code. This will also come with the overhead of pointer indirection and worse cache performance since all your objects will be void* stored in the DS (unless you m4 or macro generate your DS with all datatypes. This is what linux does for example, and I sometimes use this technique too, but this hardly the usual way to write C code). And (2) usually complex problems require special enough datastructures that it doesn't make much sense talk about ADSs. Everyone can code basic foobar with List interface then decide to use ArrayList or LinkedList based on performance. It's more interesting when the programmer decides to use a set, a hash map, a bloom filter etc to solve the problem as any other type wouldn't make sense.
- pjmlp 8y agoWe will have to agree to disagree, then. Sofware quality and meeting delivery SLAs should trump micro-optimizing cache access per code line. So if SLAs define 100ms per access, no need to go crazy making everything under 5ms. Thankfully, the Linux foundation has another view on the matter. https://www.youtube.com/watch?v=XfNt6MsLj0E https://www.youtube.com/watch?v=XfNt6MsLj0E