Code: Select all
startTick := A_TickCount Loop 100 a := A_IPAddress1 OutputDebug("Execution time = " (A_TickCount - startTick) "ms") ;example output: ; Execution time = 3890ms
Use case: I was analyzing logged TCP traffic, checking IP values in each packet against A_IPAddress1 to determine the source/destination. It was taking several minutes to process just a few thousands lines of logged traffic.
I'm guessing AHK is looking up this IP address every time it's accessed. Does AHK cache any of it's built-in variables internally after they are first retrieved? If so, would it make sense to cache A_IPAddress1-4?