for who using for,while , this show you how it's working

Just starting out? Need help? Post your questions and find answers here.
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: for who using for,while , this show you how it's working

Post by Thorium »

You are using align wrong. You dont need to align a call, so

Code: Select all

!align 4
!align 4
!align 4
!align 4
QueryPerformanceCounter_(@t3)
is unnecessary. Only loops should be aligned.

Second: There is no need to align code to 16 bytes. You need to align it to 4 bytes for x86 and 8 bytes for x64. Anyway the 16 byte alignment dont works in PB anyway, you just ignored the error message displayed if you use !align 16. If the section isnt 16 byte aligned you cant align anything inside of it to 16 byte, using 4 times align 4 doesnt change that. Actualy 4 times align 4 is the same as only one. The first align 4 aligns the code to 4 bytes and the 3 other align 4 do nothing because the code is allready aligned.
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: for who using for,while , this show you how it's working

Post by breeze4me »

Thorium wrote:You are using align wrong. You dont need to align a call, so

Code: Select all

!align 4
!align 4
!align 4
!align 4
QueryPerformanceCounter_(@t3)
is unnecessary. Only loops should be aligned.

Second: There is no need to align code to 16 bytes. You need to align it to 4 bytes for x86 and 8 bytes for x64. Anyway the 16 byte alignment dont works in PB anyway, you just ignored the error message displayed if you use !align 16. If the section isnt 16 byte aligned you cant align anything inside of it to 16 byte, using 4 times align 4 doesnt change that. Actualy 4 times align 4 is the same as only one. The first align 4 aligns the code to 4 bytes and the 3 other align 4 do nothing because the code is allready aligned.

You are right.
Some NOPs are completely negligible between QueryPerformanceCounter and the beginning of the loop, no need to use "!align 4" before QueryPerformanceCounter_().
And I have forgotten "section '.code' code readable executable align 8" line. :oops:
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

re:
My result:
(CPU: AMD Athlon II X4 630 Propus 2.8GHz)

10,000,000 loops of "While ... Wend" ; 23 ~ 28 ms
10,000,000 loops of "For ... Next" ; 24 ~ 26 ms

Thus, the difference is negligible.

how i already said,there is a difference.
your results are the best !!!

the "small" differences you got are for this case small, in all others cases in truths programs you will fill the difference!!!
did you try a real time render ? something not perfect but a script from here that use "for" and modify all in "while"

OR

try this to modify something like this:

Code: Select all

For x=1 To 10000
 For y=1 To 10000
   For z=1 To 10000
      ;{block}
      z=z+1
      Delay(1)  ;for a big job not for amateurs
    Next
  Next
Next

for while use this :

Code: Select all

x=1
While x<10001
  y=1
  While y<10001
    z=1
    While z<10001
      ;{block}
      z+1
      Delay(1)  ; 
    Wend    
    y+1
  Wend
  x+1
Wend


now replace ;{block} with a block of 5...200 instructions and see the difference you don't understand now :wink:
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

well i think this can be a little example

Code: Select all

For x=1 To 10000
 For y=1 To 10000
   For z=1 To 10000
       a=x
       b=y
       c=z
       w=a
       a=b
       b=c
       c=w
       Debug Str(a)+","+Str(b)+","+Str(c)
      z+1
      Delay(1)  ;for a big job not for amateurs
    Next
  Next
Next

Code: Select all

x=1
While x<10001
  y=1
  While y<10001
    z=1
    While z<10001
      a=x
       b=y
       c=z
       w=a
       a=b
       b=c
       c=w
       Debug Str(a)+","+Str(b)+","+Str(c)
      z+1
      Delay(1)  ;for a big job not for amateurs
    Wend    
    y+1
  Wend
  x+1
Wend
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: for who using for,while , this show you how it's working

Post by breeze4me »

Code: Select all

CompilerIf #PB_Compiler_Debugger
  End
CompilerEndIf

Procedure.q DiffFileTime(*StartTime.FILETIME, *EndTime.FILETIME)
  ProcedureReturn PeekQ(*EndTime) - PeekQ(*StartTime)
EndProcedure

Global.FILETIME KernelStartTime, KernelEndTime, UserStartTime, UserEndTime, Dummy1, Dummy2
Global.q kt, ut, cnt
Global x, y, z, a, b, c, w, time
Global test$

SetPriorityClass_(GetCurrentProcess_(), #REALTIME_PRIORITY_CLASS)
SetThreadPriority_(GetCurrentThread_(), #THREAD_PRIORITY_TIME_CRITICAL)

#code = 0  ; While ... Wend
;#code = 1  ; For ... Next


time = timeGetTime_()

GetThreadTimes_(GetCurrentThread_(), Dummy1, Dummy2, KernelStartTime, UserStartTime)

CompilerIf #code
  
  !align 4
  For x=1 To 10000
    
    !align 4
    For y=1 To 1000
      
      !align 4
      For z=1 To 1000
        
        a=x
        b=y
        c=z
        w=a
        a=b
        b=c
        c=w
        test$ = Str(a)+","+Str(b)+","+Str(c)
        cnt + 1
        
      Next
    Next
  Next
  
CompilerElse
  
  !align 4
  x=1
  While x<10001
    
    !align 4
    y=1
    While y<1001
      
      !align 4
      z=1
      While z<1001
        
        a=x
        b=y
        c=z
        w=a
        a=b
        b=c
        c=w
        test$ = Str(a)+","+Str(b)+","+Str(c)
        cnt + 1
        
        z+1
      Wend
      
      y+1
    Wend
    
    x+1
  Wend
  
CompilerEndIf

GetThreadTimes_(GetCurrentThread_(), Dummy1, Dummy2, KernelEndTime, UserEndTime)
time = timeGetTime_() - time

kt = DiffFileTime(KernelStartTime, KernelEndTime)
ut = DiffFileTime(UserStartTime, UserEndTime)

CompilerIf #code
  MessageRequester("Result: For ... Next", Str(cnt) + #LF$ + StrD((kt + ut) / 10000) + " ms (thread time)" + #LF$ + Str(time) + " ms")
CompilerElse
  MessageRequester("Result: While ... Wend", Str(cnt) + #LF$ + StrD((kt + ut) / 10000) + " ms (thread time)" + #LF$ + Str(time) + " ms")
CompilerEndIf
[/size]
---------------------------
Result: For ... Next
---------------------------
10000000000
2198750.0000000000 ms (thread time)
2198765 ms

---------------------------
Result: While ... Wend
---------------------------
10000000000
2210000.0000000000 ms (thread time)
2210031 ms
A "For~Next" loop is faster than a "While~Wend". (difference: 11250 ms)


not aligned loop. (without all "!align 4" lines)

---------------------------
Result: For ... Next
---------------------------
10000000000
2193296.8750000000 ms (thread time)
2194612 ms

---------------------------
Result: While ... Wend
---------------------------
10000000000
2216734.3750000000 ms (thread time)
2217558 ms
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

Code: Select all

CompilerIf #PB_Compiler_Debugger
  End
CompilerEndIf

Procedure.q DiffFileTime(*StartTime.FILETIME, *EndTime.FILETIME)
  ProcedureReturn PeekQ(*EndTime) - PeekQ(*StartTime)
EndProcedure

Global.FILETIME KernelStartTime, KernelEndTime, UserStartTime, UserEndTime, Dummy1, Dummy2
Global.q kt, ut, cnt
Global x, y, z, a, b, c, w, time
Global test$

SetPriorityClass_(GetCurrentProcess_(), #REALTIME_PRIORITY_CLASS)
SetThreadPriority_(GetCurrentThread_(), #THREAD_PRIORITY_TIME_CRITICAL)

;#code = 0  ; While ... Wend
#code = 1  ; For ... Next


time = timeGetTime_()

GetThreadTimes_(GetCurrentThread_(), Dummy1, Dummy2, KernelStartTime, UserStartTime)

CompilerIf #code
 

   
      !align 4
      For z=1 To 1000
       
        a=x
        b=y
        c=z
        w=a
        a=b
        b=c
        c=w
        test$ = Str(a)+","+Str(b)+","+Str(c)
        cnt + 1
       
      Next
   
 
CompilerElse
 
  
     
      !align 4
      z=1
      While z<1001
       
        a=x
        b=y
        c=z
        w=a
        a=b
        b=c
        c=w
        test$ = Str(a)+","+Str(b)+","+Str(c)
        cnt + 1
       
        z+1
      Wend
     
   
 
CompilerEndIf

GetThreadTimes_(GetCurrentThread_(), Dummy1, Dummy2, KernelEndTime, UserEndTime)
time = timeGetTime_() - time

kt = DiffFileTime(KernelStartTime, KernelEndTime)
ut = DiffFileTime(UserStartTime, UserEndTime)

CompilerIf #code
  MessageRequester("Result: For ... Next", Str(cnt) + #LF$ + StrD((kt + ut) / 10000) + " ms (thread time)" + #LF$ + Str(time) + " ms")
CompilerElse
  MessageRequester("Result: While ... Wend", Str(cnt) + #LF$ + StrD((kt + ut) / 10000) + " ms (thread time)" + #LF$ + Str(time) + " ms")
CompilerEndIf

it's enough this code to see you wrong
and i think for..next at 9 000 000 will crash .... that's happening with for..next cycles ,are limited!!!

is no need to run it by millions times is need to make a sample block code to calculate something
and you will get MY RESULTS .... for..next is slower than while wend





MORE THAN .... YOUR MEASURE METHOD IS FOR ONE TIME EXECUTION , THAT IS WRONG!!!! YOU NEED TO EXECUTE THE CODE BY MORE T TIMES DELAYED BY 1 MILLISECONDS THEN TO CALCULATE THE TIME FOR 1 MED TIME

1 TIME EXECUTION YOU GET A WRONG ANSWER
TRY TO MEASURE BY 100 TIMES
BY 1000 TIMES ....

the block you are measure is a 10000*1000*1000 *{block execution time} yes !!! but the time execution you obtain is arbitrary , is one execution time of this script , so api windows doesn't measure perfect the real time by imperfection of system host,an system host cannot be perfect! so measuring by 1000 times the same script with that measure method can be much better but not 100% perfect.


THEN tm= [OBTINEDtimeForTexecutions /T]

(tm = relative execution's time,wich is great because we talking about relativity in purebasic :wink: )
wich is the Correct result for T execution times
(WHY ???? because the processor/the system where you try the script can be busy with other thinks)


anyway if you try this on windows why you don't use this .. ?
taskkill /F /IM "explorer.exe"

and on the script was finish :
start explorer.exe


will be more precise! but Precise<>Perfect ! do not forget that!

so your script isn't an example to demonstrate the speed of the for..next and while...wend

for this reason i repeated the execution and the time prelevation by manny times ...because are inexact methods to get the real execution time ,because is ONLY A THEORETIC EXECUTION TIME ,a false result ,a percent probability of THE REAL TIME EXECUTION(on a imaginary system , an imaginary processor that works perfect).

from 1992 when i write the first script without to see a computer first believe me i sow history !!!
sorry we speak about time's execution relativity in purebasic , but the facts are right this!


your original script to talk about precise results is need it to execute it by 1000 for while..wend one by one then to sum the results and to divide them by 1000 ,then the same for for..next and to compare the results (with explorer.exe out and manny services closed)
:idea: 8) :idea:
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: for who using for,while , this show you how it's working

Post by Thorium »

Believe what you want, but please stop writing about it...

People proofed to you that you are wrong and you still try to convince them that you are right.
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

why monkey? we cannot think here because you find the banana?

:lol:
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

Code: Select all

rmax=1000
howmannytimes=10



;check if timeGetTime_() it's work
startscript = timeGetTime_()



stopscript = timeGetTime_()
wasnothing= stopscript-startscript


startscript = timeGetTime_()

Delay(howmannytimes)

stopscript = timeGetTime_()
washowmannytimesmilisecconds= stopscript-startscript
;^----------------i was ckecking if timeGetTime_() was work
;you must get 0 and howmannytimes (min and max)





relativity0=0


For y=1 To rmax;garbage for repeating the our measure method

startscript = timeGetTime_()

For x=1 To howmannytimes;wait "howmannytimes" milisecconds
   Delay(1);this is 1 milliseccond KNOWN TIME
Next

stopscript = timeGetTime_()
wasfor= stopscript-startscript

relativity0+wasfor
Delay(1);this is for good thinks
Next




relativity1=0

For y=1 To rmax;garbage for repeating the our measure method

startscript = timeGetTime_()

k=0
While(k<howmannytimes) ;wait "howmannytimes" milisecconds
   Delay(1);this is 1 milliseccond KNOWN TIME
   k+1
Wend

stopscript = timeGetTime_()
waswhile=stopscript-startscript

relativity1+waswhile
Delay(1);this is for good thinks

Next



forexecution=relativity0/rmax
whileexecution=relativity1/rmax


Debug "Results:"
Debug "void execution:" + Str(wasnothing)
Debug "Delay(howmannytimes) proc's execution:" + Str(washowmannytimesmilisecconds)
Debug "for execution:" + Str(forexecution)
Debug "while execution:" + Str(whileexecution)

this is much relative by first method , modifying with your measure method see what you get
Last edited by freepurebasic on Sat Sep 24, 2011 10:07 am, edited 1 time in total.
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: for who using for,while , this show you how it's working

Post by breeze4me »

For~Next code:

Code: Select all

For x=1 To 10000;wait "howmannytimes" milisecconds
  Delay(1);this is 1 milliseccond KNOWN TIME 
Next
The following code was generated by PB.
PB compiles(assembles) this asm code into an exe file.
(PB native code ---(by PB compiler)---> asm code ---(by FASM)---> exe file)

Code: Select all

; 
; PureBasic 4.60 RC 1 (Windows - x86) generated code
; 
; (c) 2011 Fantaisie Software
; 
; The header must remain intact for Re-Assembly
; 
; Misc
; :System
; KERNEL32
; :Import
; 
format MS COFF
; 
; 
extrn _PB_Delay@4
extrn _ExitProcess@4
extrn _GetModuleHandleA@4
extrn _HeapCreate@12
extrn _HeapDestroy@4
extrn _memset
public _PB_Instance
public _PB_ExecutableType
public _PB_OpenGLSubsystem
public _PB_MemoryBase
public PB_Instance
public PB_MemoryBase
public _PB_EndFunctions

macro pb_public symbol
{
  public  _#symbol
  public symbol
_#symbol:
symbol:
}

macro    pb_align value { rb (value-1) - ($-_PB_DataSection + value-1) mod value }
macro pb_bssalign value { rb (value-1) - ($-_PB_BSSSection  + value-1) mod value }
public PureBasicStart
; 
section '.code' code readable executable align 8
; 
; 
PureBasicStart:
; 
  PUSH   dword I_BSSEnd-I_BSSStart
  PUSH   dword 0
  PUSH   dword I_BSSStart
  CALL  _memset
  ADD    esp,12
  PUSH   dword 0
  CALL  _GetModuleHandleA@4
  MOV    [_PB_Instance],eax
  PUSH   dword 0
  PUSH   dword 4096
  PUSH   dword 0
  CALL  _HeapCreate@12
  MOV    [PB_MemoryBase],eax
; 
; For x=1 To 10000;wait "howmannytimes" milisecconds
  MOV    dword [v_x],1
_For1:
  MOV    eax,10000
  CMP    eax,dword [v_x]
  JL    _Next2
; Delay(1);this is 1 milliseccond KNOWN TIME 
  PUSH   dword 1
  CALL  _PB_Delay@4
; Next
_NextContinue2:
  INC    dword [v_x]
  JNO   _For1
_Next2:
; 
_PB_EOP_NoValue:
  PUSH   dword 0
_PB_EOP:
  CALL  _PB_EndFunctions
  PUSH   dword [PB_MemoryBase]
  CALL  _HeapDestroy@4
  CALL  _ExitProcess@4
_PB_EndFunctions:
  RET
; 
; 
section '.data' data readable writeable
; 
_PB_DataSection:
_PB_OpenGLSubsystem: db 0
pb_public PB_DEBUGGER_LineNumber
  dd     -1
pb_public PB_DEBUGGER_IncludedFiles
  dd     0
pb_public PB_DEBUGGER_FileName
  db     0
_PB_ExecutableType: dd 0
align 4
align 4
s_s:
  dd     0
  dd     -1
align 4
; 
section '.bss' readable writeable
_PB_BSSSection:
align 4
; 
I_BSSStart:
_PB_MemoryBase:
PB_MemoryBase: rd 1
_PB_Instance:
PB_Instance: rd 1
; 
align 4
PB_DataPointer rd 1
v_x rd 1
align 4
align 4
align 4
align 4
I_BSSEnd:
section '.data' data readable writeable
SYS_EndDataSection:
[/size]


While~Wend code:

Code: Select all

k=0
While(k<10000) ;wait "howmannytimes" milisecconds
   Delay(1);this is 1 milliseccond KNOWN TIME
   k+1
Wend

Code: Select all

; 
; PureBasic 4.60 RC 1 (Windows - x86) generated code
; 
; (c) 2011 Fantaisie Software
; 
; The header must remain intact for Re-Assembly
; 
; Misc
; :System
; KERNEL32
; :Import
; 
format MS COFF
; 
; 
extrn _PB_Delay@4
extrn _ExitProcess@4
extrn _GetModuleHandleA@4
extrn _HeapCreate@12
extrn _HeapDestroy@4
extrn _memset
public _PB_Instance
public _PB_ExecutableType
public _PB_OpenGLSubsystem
public _PB_MemoryBase
public PB_Instance
public PB_MemoryBase
public _PB_EndFunctions

macro pb_public symbol
{
  public  _#symbol
  public symbol
_#symbol:
symbol:
}

macro    pb_align value { rb (value-1) - ($-_PB_DataSection + value-1) mod value }
macro pb_bssalign value { rb (value-1) - ($-_PB_BSSSection  + value-1) mod value }
public PureBasicStart
; 
section '.code' code readable executable align 8
; 
; 
PureBasicStart:
; 
  PUSH   dword I_BSSEnd-I_BSSStart
  PUSH   dword 0
  PUSH   dword I_BSSStart
  CALL  _memset
  ADD    esp,12
  PUSH   dword 0
  CALL  _GetModuleHandleA@4
  MOV    [_PB_Instance],eax
  PUSH   dword 0
  PUSH   dword 4096
  PUSH   dword 0
  CALL  _HeapCreate@12
  MOV    [PB_MemoryBase],eax
; 
; 
; k=0
  MOV    dword [v_k],0
; While(k<10000) ;wait "howmannytimes" milisecconds
_While1:
  MOV    ebx,dword [v_k]
  CMP    ebx,10000
  JGE   _Wend1
; Delay(1);this is 1 milliseccond KNOWN TIME
  PUSH   dword 1
  CALL  _PB_Delay@4
; k+1
  INC    dword [v_k]
; Wend
  JMP   _While1
_Wend1:
; 
; 
_PB_EOP_NoValue:
  PUSH   dword 0
_PB_EOP:
  CALL  _PB_EndFunctions
  PUSH   dword [PB_MemoryBase]
  CALL  _HeapDestroy@4
  CALL  _ExitProcess@4
_PB_EndFunctions:
  RET
; 
; 
section '.data' data readable writeable
; 
_PB_DataSection:
_PB_OpenGLSubsystem: db 0
pb_public PB_DEBUGGER_LineNumber
  dd     -1
pb_public PB_DEBUGGER_IncludedFiles
  dd     0
pb_public PB_DEBUGGER_FileName
  db     0
_PB_ExecutableType: dd 0
align 4
align 4
s_s:
  dd     0
  dd     -1
align 4
; 
section '.bss' readable writeable
_PB_BSSSection:
align 4
; 
I_BSSStart:
_PB_MemoryBase:
PB_MemoryBase: rd 1
_PB_Instance:
PB_Instance: rd 1
; 
align 4
PB_DataPointer rd 1
v_k rd 1
align 4
align 4
align 4
align 4
I_BSSEnd:
section '.data' data readable writeable
SYS_EndDataSection:
[/size]



Code: Select all

; 
; For x=1 To 10000;wait "howmannytimes" milisecconds
  MOV    dword [v_x],1
_For1:
  MOV    eax,10000
  CMP    eax,dword [v_x]
  JL    _Next2



; Delay(1);this is 1 milliseccond KNOWN TIME 
  PUSH   dword 1
  CALL  _PB_Delay@4



; Next
_NextContinue2:
  INC    dword [v_x]
  JNO   _For1
_Next2:

Code: Select all

; 
; k=0
  MOV    dword [v_k],0
; While(k<10000) ;wait "howmannytimes" milisecconds
_While1:
  MOV    ebx,dword [v_k]
  CMP    ebx,10000
  JGE   _Wend1



; Delay(1);this is 1 milliseccond KNOWN TIME
  PUSH   dword 1
  CALL  _PB_Delay@4


; k+1
  INC    dword [v_k]
; Wend
  JMP   _While1
_Wend1:

Code: Select all

MOV MOV(reg, immed) CMP(reg, mem)   JL  INC(mem) JNO
MOV MOV(reg, mem)   CMP(reg, immed) JGE INC(mem) JMP
If the difference is remarkably big, then explain the reason, no more your theory or prejudice.



Code: Select all

CompilerIf #PB_Compiler_Debugger
  End
CompilerEndIf

rmax=10
howmanytimes=100



;check if timeGetTime_() it's work
startscript = timeGetTime_()



stopscript = timeGetTime_()
wasnothing= stopscript-startscript


startscript = timeGetTime_()

Delay(howmanytimes)

stopscript = timeGetTime_()
washowmannytimesmilisecconds= stopscript-startscript
;^----------------i was ckecking if timeGetTime_() was work
;you must get 0 and howmannytimes (min and max)





relativity0 = 0


For x = 1 To rmax;garbage for repeating the our measure method
  
  startscript = timeGetTime_()
  
  For k = 1 To howmanytimes;wait "howmannytimes" milisecconds
    Delay(1);this is 1 milliseccond KNOWN TIME
  Next
  
  stopscript = timeGetTime_()
  wasfor = stopscript - startscript
  
  relativity0 + wasfor
  Delay(1);this is for good thinks
Next




relativity1=0

For x = 1 To rmax;garbage for repeating the our measure method
  
  startscript = timeGetTime_()
  
  k=0
  While (k < howmanytimes) ;wait "howmannytimes" milisecconds
    Delay(1);this is 1 milliseccond KNOWN TIME
    
    k + 1
  Wend
  
  stopscript = timeGetTime_()
  waswhile = stopscript - startscript
  
  
  relativity1 + waswhile
  Delay(1);this is for good thinks
Next



forexecution = relativity0 / rmax
whileexecution = relativity1 / rmax


test$ + "Results:"
test$ + "void execution:" + Str(wasnothing) + #LF$
test$ + "Delay(howmannytimes) proc's execution:" + Str(washowmannytimesmilisecconds) + #LF$
test$ + "for execution:" + Str(forexecution) + #LF$
test$ + "while execution:" + Str(whileexecution) + #LF$

MessageRequester("result", test$)
[/size]
---------------------------
result
---------------------------
Results:void execution:0
Delay(howmannytimes) proc's execution:101
for execution:195
while execution:195
Last edited by breeze4me on Sat Sep 24, 2011 10:08 am, edited 1 time in total.
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: for who using for,while , this show you how it's working

Post by Thorium »

breeze4me wrote: If the difference is remarkably big, then explain the reason, no more your theory or prejudice.
He doesnt understand, just let him believe what he wants.

He doesnt even get that 1ms in delay isnt 1ms.
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

again the monkey ... :lol:
breeze4me if the asm code looks the same is one conclusion : purebasic have the best compiler i ever seen,
better than visual c++ or other microsoft's garbages
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: for who using for,while , this show you how it's working

Post by luis »

freepurebasic wrote: breeze4me if the asm code looks the same is one conclusion : purebasic have the best compiler i ever seen, better than visual c++ or other microsoft's garbages
LOL you dind't spend much time thinking about this. Comparing the complexity ANY C++ compiler (the parser alone) to PB is nonsense, then you should try to understand the kind of optimizations a compiler like microsoft or intel does compared to what PB does.
The force of PB is in its simplicity (or rigidity if you like), and that's easily reflected in a big help when it's time to generate the code.
This doesn't mean it's not a great product.

Can we vote in some way for the most useless programming thread of the year ?

I would like to cast a vote. :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: for who using for,while , this show you how it's working

Post by netmaestro »

freepurebasic wrote:purebasic have the best compiler i ever seen, better than visual c++ or other microsoft's garbages
This is too funny as PB's compiler is written in C and compiled with Microsoft Visual Studio :lol:

@luis: You're onto something there, I'd vote for it!
BERESHEIT
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: for who using for,while , this show you how it's working

Post by freepurebasic »

i think they said like this for make monkeys buy it ,to sounds important. but really is better than that microsoft's garbages.
i think was build it in fasm .

:idea:
Post Reply