I am writing to see if anyone has a suggestion to make my current version of Excel perform calculations and VBA as quickly as older versions of Excel. I have just installed Office 2016 x64 on a brand-new Windows 10 x64 i7-7500U laptop with 16GB of
RAM. The first thing I did was to fire up an old VBA-enabled workbook that I have been running since 2004 to test Excel's speed. Unfortunately, the results of the test were worse than the results on my previous machine (which was a 4-year-old processor,
less RAM and Excel 2013 x32), which was itself worse than previous machines. Performance peaked with Excel 2007 on a Dell OptiPlex GX745 with 2GB RAM. Why does it keep dropping?
As background, the Excel workbook and macro were initially set up to solve a highschool math problem. The workbook fills in random numbers and checks to see if it has happened upon the solution, and if not fills in a new set of random numbers. I then added some code to have it loop through 1000 iterations and record how many loops it took to solve the problem 1000 times, and divide by the number of seconds it took to run, to give me the number of loops per second. I know that my code could probably be streamlined significantly (turn of screen updating, etc.), but that’s not the point. The point is that the same code has been run on 20 different PCs over 13 years, so I should have an apples-to-apples comparison. Since the PCs have been getting faster, with more/faster RAM, results should be improving. But instead, they are declining.
The first machine I ran the test on was an IBM ThinkPad T21 laptop with a P3-800 processor and a whopping 512MB of RAM, which eked out 1,343 loops/second. The best was the OptiPlex, which did 7,221 loops per second.
My 3-year old Dell Precision T1700 with an i7-4770 and 32GB of RAM (running Office 2016 32-bit) did 3,467 loops/second, half the speed of the ten-year-old OptiPlex! And my brand-new i7 laptop running Excel 2016 x64 just managed 846 loops/second. Yes, 50% worse than a 15-year-old ThinkPad, and 88% worse than a 9-year-old desktop. That is pathetic.
Is there anything that can be done about this? It is crazy that Excel’s performance has degraded that significantly over time. I feel like I must be missing something.
If it’s helpful, below is the VBA code used. As you can see, it is nothing fancy.
Sub Loop1()
' This loop runs until selected cell is True
Dim i As Integer
Dim Count As Integer
Dim Timestart As Double
Dim Timeend As Double
Dim Timeelapsed As Integer
Range("Loops").ClearContents
Range("Elapsed").ClearContents
Timestart = Now
Timeelapsed = 0
For Count = 42 To 1041
Range("Current").Value = Count - 41
i = 0
Do
Calculate
i = i + 1
Loop Until Range("Overall") = "True"
Cells(Count, 3).Value = i
Next Count
Timeend = Now
Timeelapsed = (Timeend - Timestart) * 86400
Range("Elapsed").Value = Timeelapsed
MsgBox ("Nerd Alert: Done!")
End Sub