FYI

I thought that comparing only strings that start with the same character would same me some time, as it would eliminate a lot of loops but after doing some searches and test I figured out that the substring method was way too time consuming. When I use it, comparing 25000 strings with each other took about 8 to 9 minutes on a dual core laptop which is not too bad compared to the first attemped i made, but when I don't use it it takes about 8 secondes !

I think I reached a good performance level.

thanks to anyone who helped.