XL parallel on Windows, not on OS X, but why is my serial VBA code slower?

twilsonco

New Member
Joined
Dec 25, 2012
Messages
33
I'm probably beating a dead horse here...poor horse.

Does anyone know the reason why the same VBA code runs slower in OS X (Excel 2008/2011) than it does in Windows (Excel 2007/2010/2013)?

I've written several cross-platform Excel VBA projects for Excel 2011/2010/2013, and I've noticed that the same code runs (much slower) on OS X than in Windows.

A cursory search revealed several forums where people are complaining about this, and the usual suspect is that Excel on Windows is multi-threaded but not on Mac. This excuse works for built-in features like pivot-tables and filters, but my performance issues are for code that I know runs in serial, since I wrote it that way...

A quick example from a thread at Experts Exchange that runs 3 times slower in Excel 2011 than it does in Excel 2013 in a VM on the same Mac:

Code:
[COLOR=#0B374D][FONT=Courier]Sub countup()
Dim x As Long    
Debug.Print Time    
For x = 1 To 1000000000    
Next    
Debug.Print TimeEnd 
Sub[/FONT][/COLOR]

Another reference to the speed difference in the same thread.

For an example of my own code, compare the progress of this code by looking at the block count in the status bar at the bottom of the screen in these two screen captures (forgive the electronica playing in the Windows screen capture). Running in Mac vs running in Windows. It's simply painful running this utility on a Mac.

This is serial code so the multi-threading argument doesn't apply here. Maybe it's being executed through emulation in a VM or something without the user knowing. There has to be a good reason.

Again, does anyone know the reason why the same VBA code runs slower in OS X (Excel 2008/2011) than it does in Windows (Excel 2007/2010/2013)?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I don't know the reason (frankly I doubt anyone outside Microsoft does exactly) but for the record Excel 2008 won't run VBA at all, never mind a bit slower.
 
Upvote 0
Just for the record. I tried the code in both the Mac and Windows versions of Excel 2016, and serial code in Excel VBA now appears to run equally fast for both. This is based on the same code running on my mac in Excel 2016 for Mac vs in a Parallels Desktop Windows 10 VM on the same machine running Excel 2016.

While Excel 2016 for Mac is still missing dozens of features relative to its Windows counterpart, at least it now appears to run VBA "natively".
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top