HOME
ABOUT ME
Biography
How I Became Boog
The Real Boog Powell
My Resume
WRITING
Stories
Reviews For Writers
Writing Links
CONTACT
   
   

Visit my other site:
Bleeker Books

Friends Of Boog


Recent Posts


Complete Archives

"Ah, but I was so much older then, I'm younger than that now."

My Boog Pages


Tuesday, December 5
Programming Efficiency, Elegance, and Performance

In my post the other day on importing XML as .NET objects, I alluded to my philosophy on programming elegance and performance without ever really going into it.

When writing a program, I always choose efficiency and elegance over performance. To me, efficiency means completing a task in the fewest steps possible, not always in the quickest way, whereas elegance usually means finding a clever solution that also seems completely obvious when you see it.

But code that is efficient and/or excellent does not always perform well. It's very simple to convert an object to XML using serialization, then load that XML into a DataSet, but there's a lot going on under the hood, and those extra steps in the background may cause this to take more time to run than simple BFI.

In these cases I always rely on the "Let Bill do it!" technique. Put simply, I rely on the developers of Visual Basic and the .NET framework to be smarter and more experienced than I am, and especially better at squeezing a few more ounces of performance from their code.

(Yeah, I use Visual Basic, and have for years. With most of the work shifted to .NET, I don't think this is much of a bottleneck anymore.)

So whenever I can, I go for the simplest method and let Microsoft do the work. It makes my code easier to read and maintain without much of a performance hit. And I let Moore's Law inflate away whatever hit there is. After all, you can always buy a faster processor tomorrow.


Tags: .


posted by Graham at 12:49 PM permalink

Trackbacks | Comments (0)


This page is powered by Blogger. Isn't yours?

Listed on BlogShares