LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

macintosh performance problem

I am in the process of porting a labview application originally written on a windows machine to a Macintosh.

I have noticed that the application runs significantly slower on the Mac. I have set up a small testbed (attached) to measure relative performance. The testbed consists of performing a loop 10 million times and measuring the time to complete.

On a 4 year old 1 Ghz windows laptop the program completes in under 9 seconds.

On a brand new 1.67 Ghz Mac powerbook it takes 16 seconds to complete.

Labview version is 7.1. Windows operating system is XP. Mac OS 10.

I was naturally expecting that the Mac would be much faster. For most other applications (picture editing using Photoshop, opening Word files, etc.) that is certainly the case.

Has anybody else noticed this situation? Does anybody have an explanation?

David Lieberman
0 Kudos
Message 1 of 5
(2,250 Views)
Your problem is related to display, not to computing power. LV seems to handle front panel/indicators updates differently under MacOS and Windows.
Take the indicators out of the loop, and you will see the difference !

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 2 of 5
(2,239 Views)
Thanks for the advice.

I did remove the screen update from the loop and as you say the time went down dramatically but it went down for Windows as well and the gap between windows performance and Mac performance remains.

I also tried adding a subvi call to the loop and saw performance deteriorate dramatically. Apparently the overhead associated with sub vi calls is a major problem.

Here is the result of my measurements. The windows machine is 1 Ghz. The Mac this time is an iMac 1.8 Ghz. (the powerbook is in the shop). All numbers are in seconds.


Windows Mac
Loop 10 million times with screen update 8.73 28.53
Loop 10 million times without screen update 3.19 8.74
Loop 10 million times with sub vi call 20.79 60.08

The only conclusion I can draw is that Labview runs very, very slowly on the Mac. It is puzzling.

David
0 Kudos
Message 3 of 5
(2,231 Views)
Sorry for the formatting problem in the reply. Here is an Excel spreadsheet with the results.
0 Kudos
Message 4 of 5
(2,243 Views)
You are right. LV on Mac seems to be slower than on PC.
My comparison of Mac and Windows gave the following results;

....................................................PC 2.6 GHz....PowerbookG4 1.25 GHz
10000000 empty loops.............................0.11 s........0.13 s
10000000 loops and multiplications...........0.20 s........0.68 s
10000000 loops and Lns..........................0.76 s.........2.46 s
Create a 1000000 1D array.......................0.22 s........0.67 s
Sort a 1000000 1D array..........................1.07 s........4.55 s
Invert a 1000x1000 array..........................5.18 s.......13.77 s
1000000 number 1D array to string array...1.32 s.........6.25 s
Except for empty loops, the Mac appears to be 50% slower on average. Means that the Mac is better at doing nothing. I'll throw my Pbook in the garbage at the next occasion...

Have a look at the attached vi.
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 5 of 5
(2,210 Views)