Quote:
|
It's not that. Outcome of someone's code is a result of their motivation. Their motivation comes from their need. Their need may not be relevent to mine. You said it yourself: "they tend to make code longer." They tend to look at increasing processor speed and ram size and ignore 'performance' factors. Even my teacher is like "should use the Integer object in java instead of its primitive version." Thats right...he said "primitive" version. I dont see how they can keep going like this. Processor speeds seem to have stablized around 3.something ghz and now they are going for multi cores. Whats next? Hardware operating system? I reckon things are going in all the wrong directions. Anyways...my point is...they dont die if their stuff is slow.
|
I develop for a popular commercial compiler. Even if I'm never going to use a library function that I write, I write it to the best of my ability. Anything less would be an insult to end-users, such as yourself. Your argument is that I'm willfully ignorant of performance considerations because I think hardware will keep up the slack, which couldn't be further from the truth. Performance is second only to correctness when I'm writing code for you. All false modesty aside, I'm probably a much better programmer than you are, with significantly more experience. Saying that you don't trust your libraries (and your reasoning for saying that) is tantamount to saying that you think I'm incompetent.
Now, your library is written to be generic. That's an unbreakable requirement that affects performance, so I won't tell you that you can't write faster code with an ad hoc approach than I would with a generic approach. What I will tell you is what I've told you before. Prefer the library, and if it's not fast or small enough for your needs after profiling, then you can take the time to write a customized solution. 9 times out of 10, the library will be sufficient, so that process is a much more efficient use of your time.