Well, for starters in might have something to do with the way you are creating your hash %hash. Each time you cycle through the outer loop @start_array grows in size (by a factor of 5) so each throw of the die results in every more iterations in the inner two loops. Here is what the count looks like:
throw of die: 1:
iterations in inner two loops: 25
total iterations: 25
throw of die: 2:
iterations in inner two loops: 125
total iterations: 150
throw of die: 3:
iterations in inner two loops: 625
total iterations: 775
throw of die: 4:
iterations in inner two loops: 3125
total iterations: 3900
throw of die: 5:
iterations in inner two loops: 15625
total iterations: 19525
throw of die: 6:
iterations in inner two loops: 78125
total iterations: 97650
throw of die: 7:
iterations in inner two loops: 390625
total iterations: 488275
throw of die: 8:
iterations in inner two loops: 1953125
total iterations: 2441400
...
Did you mean for @start_array to be growing in size this way? By dice throw 10, @start_array will have 5 to the 10th power number of elements and the 10th throw will require 5*11 iterations to complete.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|