Posted on 2007-12-05 17:50:00
Tags: programming links
I don't usually post stuff like this, but this is possibly the best programming WTF ever. Add() reallocates memory each time (although I guess maybe the C# Array class does the doubling thing for you?), and Remove()...ow, my eyes! O(n^2) FTW.
The explanation at the end, of course, seals the deal.
Comment from djedi:
Comment from brittongregory:
See, I was almost sympathetic with James -- it's a pretty naive class, but I tend to be naive until I know I need to work on performance -- until the explanation. Then I lost hope. ;)
Comment from othersider:
Wow. I am at a loss for words. Where do you even begin with this guy?
This backup was done by LJBackup.