Complexity Analysis

Dennis Faas's picture

I'm swamped!

I spent the majority of this weekend writing and re-writing the email list-management program which will automate requests for users who subscribe, remove, and change their email address to this newsletter online the infopackets web site.

After much thought, I completed the program on Saturday using a very rudimentary algorithm. The program worked very well with small lists used for test data, but took exponentially long to complete when I tested it against all the user names that make up our mailing list [40,000].

Measuring how long it takes for a program or operation to complete is referred to as complexity analysis. Often, complexity is measured with respect to time and work done. Want to know more? Get this PDF (Adobe Acrobat) eBook on Complexity. It's from the University of Windsor School of Computer Science: the same place where I earned my Degree.

Learning how to program: The Right Way.

After searching the web for some answers, I found a better way to remove duplicates from a large list: sort the list first, and then compare each entry respective to the previous. I know this is all techy stuff, so I'll stop while I'm ahead and just tell you that it took me many days of contemplating with lots of testing before I could write the program correctly and efficiently.

| Tags:
Rate this article: 
No votes yet