Page 1 of 1

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

Posted: Thu Sep 24, 2009 9:35 am
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" ?

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

Posted: Thu Sep 24, 2009 10:58 am
by djes
How do you compute computer time?

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

Posted: Thu Sep 24, 2009 11:06 am
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.

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

Posted: Thu Sep 24, 2009 11:41 am
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.

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

Posted: Thu Sep 24, 2009 2:00 pm
by freak
WaitWindowEvent() with a timeout is less efficient on OSX than on Windows. This is an OSX thing, not a PB problem.

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

Posted: Fri Sep 25, 2009 8:27 am
by Offin
Ok.
Thank you for your quick answer.