Fix a performance issue in Decimal.pow.  Thanks Stefan Krah for finding this.
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 828027c..71408a8 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -2047,12 +2047,14 @@
         # case where xc == 1: result is 10**(xe*y), with xe*y
         # required to be an integer
         if xc == 1:
-            if ye >= 0:
-                exponent = xe*yc*10**ye
-            else:
-                exponent, remainder = divmod(xe*yc, 10**-ye)
-                if remainder:
-                    return None
+            xe *= yc
+            # result is now 10**(xe * 10**ye);  xe * 10**ye must be integral
+            while xe % 10 == 0:
+                xe //= 10
+                ye += 1
+            if ye < 0:
+                return None
+            exponent = xe * 10**ye
             if y.sign == 1:
                 exponent = -exponent
             # if other is a nonnegative integer, use ideal exponent