C
Clive Tooth
For the last few months I have been running a processor-intensive
program which I wrote in C# and which is called Zeros6.
The approximate elapsed time, so far, has been 157 days and the total
processor time is 1,217 days. [Some details of the computer: Intel
Core i7 2600 / 3.4 GHz / 4 cores + hyperthreading -> 8 processors.]
I wrote the program using Visual Studio Express 2010 and version 4 of
the .NET Framework (I think).
Anyway, today I decided to install Visual Studio Express 2012. The
installer installed version 4.5 of the .NET Framework and then
requested a reboot to continue the installation. I stopped the Zeros6
program and OKed the reboot. After the reboot Zeros6 restarted
automatically as usual and the Visual Studio installation continued
and soon finished. I was then shocked to discover that Zeros6 was
running MUCH faster than it usually runs. A speed indicator which is
usually fairly steady at 5.5 (picoseconds per digit) had dropped to
2.0 - I had never seen it lower than 5.34. I then stopped and started
the program a few times, and rebooted the computer again, but the
speed improvement continues to persist. If we call the old speed 100%,
the new speed is 275% !!
I am curious to know what is going on.
All 8 processors spend most of their time doing this...
{
ulong carry = 0;
unchecked
{
for (uint i = startI; i < stopI; i++)
{
ulong m = ((ulong)digits << bigPowerIncrement) | carry;
carry = m/myBase;
if ((digits = (uint)(m - myBase*carry)) < 1000000)
{ // get here about 1 time in 100
h.specials[h.specialCount++] = i;
}
} // i loop
} // unchecked
h.carry = carry;
}
Some declarations...
uint[] digits;
uint startI;
uint stopI;
public static readonly int bigPowerIncrement = 34;
public static readonly uint myBase = 1000000000;
program which I wrote in C# and which is called Zeros6.
The approximate elapsed time, so far, has been 157 days and the total
processor time is 1,217 days. [Some details of the computer: Intel
Core i7 2600 / 3.4 GHz / 4 cores + hyperthreading -> 8 processors.]
I wrote the program using Visual Studio Express 2010 and version 4 of
the .NET Framework (I think).
Anyway, today I decided to install Visual Studio Express 2012. The
installer installed version 4.5 of the .NET Framework and then
requested a reboot to continue the installation. I stopped the Zeros6
program and OKed the reboot. After the reboot Zeros6 restarted
automatically as usual and the Visual Studio installation continued
and soon finished. I was then shocked to discover that Zeros6 was
running MUCH faster than it usually runs. A speed indicator which is
usually fairly steady at 5.5 (picoseconds per digit) had dropped to
2.0 - I had never seen it lower than 5.34. I then stopped and started
the program a few times, and rebooted the computer again, but the
speed improvement continues to persist. If we call the old speed 100%,
the new speed is 275% !!
I am curious to know what is going on.
All 8 processors spend most of their time doing this...
{
ulong carry = 0;
unchecked
{
for (uint i = startI; i < stopI; i++)
{
ulong m = ((ulong)digits << bigPowerIncrement) | carry;
carry = m/myBase;
if ((digits = (uint)(m - myBase*carry)) < 1000000)
{ // get here about 1 time in 100
h.specials[h.specialCount++] = i;
}
} // i loop
} // unchecked
h.carry = carry;
}
Some declarations...
uint[] digits;
uint startI;
uint stopI;
public static readonly int bigPowerIncrement = 34;
public static readonly uint myBase = 1000000000;