Advertisement
Java_Volume1 Data Structures #102046

Country Name By Abbreviation Function (Peformance testing Included)

A function for getting Country Names By Abbreviation. It also has a function builder for creating the function, so you don't have to take the endless task of re-typing the Country names. I also included some performance tests which you can see in the screenshots. I wanted to see the difference between using Select Case and If...then...ElseIf. It turned out quite interesting! Please leave comments if this was useful, and let me know if you can get the function to stay at .0000 processing time.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
When you unzip to your wwwroot folder go directly to the folder and the default.asp page has the links to each script in the project, it also explains it in there. 
The code is pretty well commented, I just wanted to share the idea of creating a function with ASP, as well as performance tips. And also I couldn't find a nice function for country abbreviations.
What you can see from the performance tests is that the Select case is much faster, and in the faster one the select's are shorter, then just one long Select Case. Just check out the code you will get the idea.
Happy coding! 
Please leave any comments, or suggestions.
Jason H
http://www.vzio.com
Original Comments (3)
Recovered from Wayback Machine