Hacker News new | past | comments | ask | show | jobs | submit login

Re: your edit regarding ADTs: it's not that they are expensive to implement, it's that they give you no control over the physical structure of the data, which is the really, really important thing when it comes to how expensive it is to perform operations on that data. That's the point Rob was making in #5.

BTW, if you want to gain an understanding of this stuff, the difference it can make and why, I'd recommend reading basically anything by Michael Abrash.




I think we can agree that having that level of control is unnecessary for most programming tasks. In fields where it matters, fine. Otherwise I let the compiler do it's job, probably they will get better/are already better at it than me. I don't trust humans, including myself. My compiler never made a bad decision so far because it woke up with a hangover/in a bad mood.


Your compiler has no idea about whether data structure A will perform 100 times faster than data structure B because B is scattered all over memory and incurs a page fault on every reference and A has locality of reference.

No compiler optimization is going to get you a 100 to 1 improvement with a conventional language, but choosing the right data structure and algorithm for a task certainly can.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: