Equal Signs - Test Speed (.= \ = \ := \ = %)

Post your working scripts, libraries and tools
User avatar
V for Vendetta
Posts: 105
Joined: 29 Sep 2016, 11:33

Equal Signs - Test Speed (.= \ = \ := \ = %)

29 Nov 2016, 09:11

".=" is fast and faster than "=" (500 000 rows took 5 000 milliseconds):

Code: Select all

File = Text (Test).txt

gui, add, text, w300 r10 center 0x200 vTextBox, Please Wait!!!	;"0x200" center text vertically (but "`n" or "`r`n" will not represent new lines)
gui, show

StartTime = %A_TickCount%

loop, 500000
text .= a_index "`r`n"

guicontrol, , TextBox, Done

FileDelete, %File%		;Delete File

FileAppend, %text%, %File%, UTF-8	;"UTF-8" is the file Encoding \ UTF-16 \ UTF-8-RAW or UTF-16-RAW \ Empty or omitted: the system default ANSI code page, which is also the default setting.

gui, destroy

msgbox, % "Done - " A_TickCount - StartTime

guiclose:
exitapp
"=" is fast but slower than ".=" (500 000 rows took 10 000 milliseconds):

Code: Select all

File = Text (Test).txt

gui, add, text, w300 r10 center 0x200 vTextBox, Please Wait!!!	;"0x200" center text vertically (but "`n" or "`r`n" will not represent new lines)
gui, show

StartTime = %A_TickCount%

loop, 500000
text = %Text%%a_index%`r`n

guicontrol, , TextBox, Done

FileDelete, %File%		;Delete File

FileAppend, %text%, %File%, UTF-8	;"UTF-8" is the file Encoding \ UTF-16 \ UTF-8-RAW or UTF-16-RAW \ Empty or omitted: the system default ANSI code page, which is also the default setting.

gui, destroy

msgbox, % "Done - " A_TickCount - StartTime

guiclose:
exitapp
":=" is slow and the same as "= %" (20 000 rows took 11 000 milliseconds):

Code: Select all

File = Text (Test).txt

gui, add, text, w300 r10 center 0x200 vTextBox, Please Wait!!!	;"0x200" center text vertically (but "`n" or "`r`n" will not represent new lines)
gui, show

StartTime = %A_TickCount%

loop, 20000
text := Text a_index "`r`n"

guicontrol, , TextBox, Done

FileDelete, %File%		;Delete File

FileAppend, %text%, %File%, UTF-8	;"UTF-8" is the file Encoding \ UTF-16 \ UTF-8-RAW or UTF-16-RAW \ Empty or omitted: the system default ANSI code page, which is also the default setting.

gui, destroy

msgbox, % "Done - " A_TickCount - StartTime

guiclose:
exitapp
"= %" is slow and the same as ":=" (20 000 rows took 11 000 milliseconds):

Code: Select all

File = Text (Test).txt

gui, add, text, w300 r10 center 0x200 vTextBox, Please Wait!!!	;"0x200" center text vertically (but "`n" or "`r`n" will not represent new lines)
gui, show

StartTime = %A_TickCount%

loop, 20000
text = % Text a_index "`r`n"

guicontrol, , TextBox, Done

FileDelete, %File%		;Delete File

FileAppend, %text%, %File%, UTF-8	;"UTF-8" is the file Encoding \ UTF-16 \ UTF-8-RAW or UTF-16-RAW \ Empty or omitted: the system default ANSI code page, which is also the default setting.

gui, destroy

msgbox, % "Done - " A_TickCount - StartTime

guiclose:
exitapp
User avatar
Lateralus138
Posts: 49
Joined: 30 Aug 2015, 20:52
Facebook: lateralus138
Google: +IanPride
GitHub: Lateralus138
Location: Decatur, IL.
Contact:

Re: Equal Signs - Test Speed (.= \ = \ := \ = %)

29 Nov 2016, 16:25

I was actually wondering about this not too long ago, thanks for the info!!! Been planning a few speed tests myself on different things.

K̴̡̛̻̮̼͕̬̑̋̀̂͆͛̍̑͢ȩ̮̞͍̩̯̋̈͒͌̕ę̶͓̗͖͔̹̪͗̂̈͛̓͘p̠͉̙̟̒̊͌̐͘͘͟͡͞ S̸͖̖̮̞̥͇̖̓̌͛̽̿̓̊̓̾̚͜w͇̮͓̱͇̘̯͆̓͑̋̇̉͜͝i̢͔̝̳̻̱̋̾͐̾͗͊̀̕͜͡͡n̷̡͔̦̤̝̼̩̎͌̈́̀͛̄͆̎͠ǵ̸̘̝̭̦̠̗͖͌͐͑̑̿̅̈͜͜ḯ̡̬̥̙̩̼̪̑͆̿̌́n̛̼͎̲̬͇̲͉̗̞͊̓̃̂̈͝g̸͕̜͖̪͉͔̩̓̃̀̃͌̑̋̕͘.̪̜̜̜̯̂͂̈́͛̆͗̇̍̇.̟͔͍̙̜̫̗̂̿͛͋͋̈́̾̾̿͑.̡̣̟̝̭͉̦̪́̓̀͛̑̓̐̈͘͘

User avatar
V for Vendetta
Posts: 105
Joined: 29 Sep 2016, 11:33

Re: Equal Signs - Test Speed (.= \ = \ := \ = %)

29 Nov 2016, 16:50

Lateralus138 wrote:I was actually wondering about this not too long ago, thanks for the info!!! Been planning a few speed tests myself on different things.
Yes, it's a useful script! A lot of people do not know about this!
just me
Posts: 6972
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Equal Signs - Test Speed (.= \ = \ := \ = %)

29 Nov 2016, 16:59

Lateralus138 wrote:... , thanks for the info!!!
V for Vendetta wrote:Yes, it's a useful script!
User avatar
V for Vendetta
Posts: 105
Joined: 29 Sep 2016, 11:33

Re: Equal Signs - Test Speed (.= \ = \ := \ = %)

29 Nov 2016, 17:36

just me wrote:
Lateralus138 wrote:... , thanks for the info!!!
V for Vendetta wrote:Yes, it's a useful script!
LolLolLolLolLolLolLolLolLolLolLolLolLolLolLolLolLolLolLolLol...!

Return to “Scripts and Functions”

Who is online

Users browsing this forum: blue83, WatsonEnterprises and 58 guests