Just an implementation to find out all the Pythagorean triples till a certain limit. A Pythagorean triple is a triple of integer numbers a,b and h where h²=a²+b²
I modified your code a little bit to accelerate it (remove the most inner loop). And then I realized that it does not automatically eliminate symmetric triples anymore! So additional guard must put in place to ensure unique triples. Now it's so fast that it overtook my program by a factor 6-8! Cool!