Never make assumptions about performance

The importance of measuring performance changes is a topic that has been covered by others smarter and more experienced than me, but I have a recent simple tale.
I’ve simplified the code quite a bit in order to demonstrate the issue. Suppose I have a wrapper around an image (it has many more attributes):

[...]

Popularity: 3% [?]

Tip: Mouse back and forward work in Visual Studio 2005 too

You know how you can use the extra mouse buttons to move back and forward in Internet Explorer?
The same shortcuts work in Visual Studio. Suppose you right-click on a function call, and select Go To Definition. Once you’re done looking at the definition, hit the back button on your mouse: You’re taken right back to [...]

Popularity: 2% [?]

Instant Searching and Filtering in .Net - Part 3

This is part three of my series on fast searching and filtering of text using C#.
The previous article developed an indexing method using a hash table. This article develops a method using a trie structure. If you don’t know tries, I highly encourage to go read about them before continuing.
This filtering method is much more [...]

Popularity: 2% [?]

Instant Searching and Filtering in .Net - Part 2

This is part two of my series on fast searching/filtering of text using C#.
In the previous article, we developed the filtering interface, built up a testing framework and implemented a naive indexer. For many purposes, that indexer performs more than adequately. Still, there are other possible implementations that might work better (or not…let’s wait and [...]

Popularity: 2% [?]

Don’t ignore naive or "stupid" algorithms — hardware is cheap and fast

I just had a nice reality check. Sort of pleasant in that I realized I could save a LOT of memory usage (like from 35MB down to 9 MB), but also aggravating because I have spent probably 10-20 hours developing a clever algorithm designed for speed.
Lesson learned. I should have built the naive version first. [...]

Popularity: 1% [?]

2-D Arrays versus Structs

I had a situation the other day where I needed an array of two values and the thought occurred to me: which is better? A 2-D array or a 1-D array of structs. I decided to come up with a quick test to see.
Here are my results:
2-D Arrays : 55.9376 cycles/row
Structs [...]

Popularity: 1% [?]

List<> vs. ArrayList

I read Rico Mariani’s latest quiz, and decided to check out the results for myself in BRayTracer.
I already have some simple performance benchmark tests in my NUnit tests, so I ran some before and after. I changed only the ArrayList’s used in the scene object to hold shapes, materials, and lights.
Before:
25.197 opaque spheres/sec (time: 3.969 [...]

Popularity: 1% [?]

Code Timing functions

time_t vs. GetTickCount vs QueryPerformanceTimer vs. GetMachineCycleCount

Popularity: 2% [?]