Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

global or local declaration in a loop = inefficient?

$
0
0
Is there difference in speed/efficiency between the following two solutions?

local $foobar
for $i = 1 to 1000
    $foobar = "house"
    do_this_and_that...
next

____


for $i = 1 to 1000
    local $foobar = "house"
    do_this_and_that...
next

____

note: I visually prefer to set the value inside the function instead than on the top in my real case because I need it in the middle of a long function....

Viewing all articles
Browse latest Browse all 12506

Trending Articles