Wb-FreeKill Posted March 26, 2005 Posted March 26, 2005 Well, ive been working on a program the last cuple of weeks, mosly just for the learning and understanding... and its finaly comming to an end. Its a 1500 line compact script, with LOTS of buttons and other stuff, and it uses about 30 % cpu time with a "sleep (20)" in the while, to slow it down I will NOT post my program here, as it's personal.. but i would like to have someone who may know how to optimize it, to take a look at it, and maybe found a solution! If someone has an interest of looking at it, and see what the problem, if their is any, then tell me and i could send you the program. I will only give it to one person that i can trust... so.. anyone?
zcoacoaz Posted March 26, 2005 Posted March 26, 2005 do you trust me? [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]
Wb-FreeKill Posted March 26, 2005 Author Posted March 26, 2005 do you trust me?<{POST_SNAPBACK}>Not nesseseraly, would you trust yourself?
zcoacoaz Posted March 26, 2005 Posted March 26, 2005 in some cases no. in most cases probably. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]
Wb-FreeKill Posted March 26, 2005 Author Posted March 26, 2005 in some cases no. in most cases probably.<{POST_SNAPBACK}>Well, i think ill just leave it to someone else, unless you are willing to do it?
Ejoc Posted March 26, 2005 Posted March 26, 2005 Well my suggestions: 1) Reduce the number of system calls, "talking" to the OS and Harddrives is much slower then accessing memory in you program 2) If you are indexing something alot $var[$i] then set a local to it and use the local. local $whatever = $var[$i], indexing is slower then using a regular variable 3) If you are looping thru to find a value, For $i=0 to 100000, and you find it, exit the loop 4) make sure you need to call something before calling it: $m = MouseGetPos() if $copymouse Then $ImportantX = $m[0] is slower then: if $copymouse Then $m = MouseGetPos() $ImportantXY = $m[0] Endif 5) If its still in print, the O'Reilly book, High Performance Computing is a good read for optimizing your code for speed Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Wb-FreeKill Posted March 27, 2005 Author Posted March 27, 2005 well, it has alot of If... Then.. but i can't really sort something out..
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now