[PB4.31_x86] .APP needs more processor time than .EXE

Mac OSX specific forum
Offin
User
User
Posts: 34
Joined: Mon May 04, 2009 10:53 am
Location: France

[PB4.31_x86] .APP needs more processor time than .EXE

Post by Offin »

I have a computer with dual boot : Windows XP and Osx.
I compiled an executable file with the following source code for each operating system:

Code: Select all

OpenWindow(0, 100, 100, 300, 200, "1")
Repeat
   event = WaitWindowEvent(25)
   If Event = 0
      For k = 1 To 1200000
         n = 555;
         n = k * n
         n = k / n
      Next k
   EndIf
Until Event = #PB_Event_CloseWindow
Under Osx, the executable file (.app) requires twice more processor time than the executable file (.exe) under Windows XP.
I am wondering if this is normal because Osx basically requires more processor time than Windows XP, or could we say "such basic source code should take same processor time on same computer, whatever is the operating system" ?
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: [PB4.31_x86] .APP needs more processor time than .EXE

Post by djes »

How do you compute computer time?
Offin
User
User
Posts: 34
Joined: Mon May 04, 2009 10:53 am
Location: France

Re: [PB4.31_x86] .APP needs more processor time than .EXE

Post by Offin »

I simply get the information from the "Windows Task Manager" screen (section "process"), and from the Osx "Activity Monitor" screen.
Without this code running, the processor is 99% free on both operating systems.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: [PB4.31_x86] .APP needs more processor time than .EXE

Post by djes »

You can't rely on these indicators. They don't have the same calculation methods. More than that, the task schedulers on the two systems are completely different. But you're right, if the program is not disturbed, it should take the same amount of time. However, as you're waiting for some event, maybe your task is waiting more on MacOS than on Windows. You should try without this.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: [PB4.31_x86] .APP needs more processor time than .EXE

Post by freak »

WaitWindowEvent() with a timeout is less efficient on OSX than on Windows. This is an OSX thing, not a PB problem.
quidquid Latine dictum sit altum videtur
Offin
User
User
Posts: 34
Joined: Mon May 04, 2009 10:53 am
Location: France

Re: [PB4.31_x86] .APP needs more processor time than .EXE

Post by Offin »

Ok.
Thank you for your quick answer.
Post Reply