WolfWorld Posted August 11, 2009 Posted August 11, 2009 (edited) No longer supported please use Eat Spaghetti instead, it better and faster with more function.Here is my first version of Autoit Optimize.It's like Obfuscator but instead of slowing it down. It's making your script run faster.How does this works? Autoit is a Thrid-Level language which at least what I called.It does not compile your code to Machine Code nor Byte alike code at any given time.So it need to read your Variables and Functions over and over and over. The shorter the name the better.So this is what this script does.It also work on script that passes Obfuscator but it need work around I will explain later on.... Am going to sleep now. See ya!Just wrote it so sleepy.Here is the things I fixed before release(I think you should know)Replacing error, if replace $i before $iLoveYou it will not replace $i LoveYou again. This is fixed by using sort function (bigger first).Support Object type in Autoit like $test.Process.HelloSupport functions renaming also. (You can't use #include with this tool. You will have to put all of the conntent in one file, or use Obfuscator to do it.)Support more than 26 + 26*26 Variable by adding the thrid charactor. So it becomes 26 + 26*26 + 26*26*26 Which is enough for Obfuscator.Support Obfuscator also but need work around. Here is how.Obfuse you code by youself and open.Search for _()You will see FOR below it.and you will see a Variable below FOR copy that.Optimize you script and open the newly optimized script.Goto the exact same line. Replace that variable with the one that I told you. And also replace the variable in the FileInstall with the same one on your ClipBoard.Now you can run it normally.Autoit Optimize_Release.exe Edited August 27, 2009 by athiwatc Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
trancexx Posted August 11, 2009 Posted August 11, 2009 Nope, I don't dare to test it >_<That's pathetic, you know.It works. Renames variables and functions to shorter, nothing more.Bad thing is that includes $CmdLineRaw or $CmdLine and for example used constants from included scripts.I find it to be redundant. ♡♡♡ . eMyvnE
Zisly Posted August 11, 2009 Posted August 11, 2009 That's pathetic, you know.It works. Renames variables and functions to shorter, nothing more.Bad thing is that includes $CmdLineRaw or $CmdLine and for example used constants from included scripts.I find it to be redundant.In which way is it pathetic?I just don't like downloading things without being sure it's safe.
Wus Posted August 11, 2009 Posted August 11, 2009 (edited) @ZislyYou ought to check out VirtualBox as it would allow you to run the executable in a safe environment. A bit of work to set up, but I bet you would find it endlessly useful.@trancexxCalling someone pathetic in such a cavalier manner is well (I hate to be cliche) but pathetic. Edited August 11, 2009 by Wus
trancexx Posted August 11, 2009 Posted August 11, 2009 @trancexxCalling someone pathetic in such a cavalier manner is well (I hate to be cliche) but pathetic.Interesting. How come? ♡♡♡ . eMyvnE
Wus Posted August 11, 2009 Posted August 11, 2009 Interesting. How come?You insult someone without offering any aid whatsoever thus showing that your motives are not in fact benevolent, which I find pathetic since it means that you probably just threw the insult in there for an ego-trip.Meh, maybe I am reading it all wrong -- I just felt that giving a little information would be more helpful than belittling someone.Consider this my EOF marker for this thread.
trancexx Posted August 11, 2009 Posted August 11, 2009 You insult someone without offering any aid whatsoever thus showing that your motives are not in fact benevolent, which I find pathetic since it means that you probably just threw the insult in there for an ego-trip.Meh, maybe I am reading it all wrong -- I just felt that giving a little information would be more helpful than belittling someone.Consider this my EOF marker for this thread.You did read my whole pathetic post?Since you EOF-ed I suppose there is no point in me explaining to you why I find Zisly's reaction pathetic. ♡♡♡ . eMyvnE
WolfWorld Posted August 12, 2009 Author Posted August 12, 2009 (edited) That's pathetic, you know.It works. Renames variables and functions to shorter, nothing more.Bad thing is that includes $CmdLineRaw or $CmdLine and for example used constants from included scripts.I find it to be redundant.Don't worry i will update it soon.The script now can't read into the #include (yet).And if you can tell me all the Autoit Variables (Like $CmdLine) I will update it.AND NO I Don't program viruses! Nobody ever trust me >_< And Why is it that every topic I open there is going to be a fight or something similar! Edited August 12, 2009 by athiwatc Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
Szhlopp Posted August 13, 2009 Posted August 13, 2009 Don't worry i will update it soon.The script now can't read into the #include (yet).And if you can tell me all the Autoit Variables (Like $CmdLine) I will update it.AND NO I Don't program viruses! Nobody ever trust me And Why is it that every topic I open there is going to be a fight or something similar!Looks cool. I don't have time to fully test it right now, but great job!And I don't know why people have to fight over everything. I would ask a mod to remove all the useless random posts knocking eachother. It's rediculous, childish and all around stupid >_< RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+'
WolfWorld Posted August 14, 2009 Author Posted August 14, 2009 Looks cool. I don't have time to fully test it right now, but great job!And I don't know why people have to fight over everything. I would ask a mod to remove all the useless random posts knocking eachother. It's rediculous, childish and all around stupid >_<Thanks I will update it soon with more optimize support. Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
Developers Jos Posted August 14, 2009 Developers Posted August 14, 2009 Serious question: How much will a shorter variable name speed up the process? In other words: did anybody do speed tests and is able to share the script and the results? It is for me trivial to change Obfuscator to support the creation of short variable names in stead of the "hard-to-read" variable names. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Moderators Melba23 Posted August 14, 2009 Moderators Posted August 14, 2009 Jos, Out of interest I just ran this very short and pretty unrepresentative test: $sShort = 0 $sVeryMuchLongerVariable = 0 $nBegin = TimerInit() For $i = 1 To 10000000 $sShort = 1 Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) $nBegin = TimerInit() For $i = 1 To 10000000 $sVeryMuchLongerVariable = 1 Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) The results if I run with the short variable name first: Short: 3761 3861 3801 3792 Long: 3979 3934 3987 3936 and then with the long variable name first (always a good idea to reverse the order in any experiment*): Short: 3760 3789 3844 3759 Long: 3968 4016 4031 4016 Seems pretty clear that the shorter name is faster in this test by about 5% - which I find very surprising. >_< M23 * See RV Jones' book - Most Secret War Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Zisly Posted August 15, 2009 Posted August 15, 2009 So naming your variable $1,$2 would be the best way?
Skrip Posted August 15, 2009 Posted August 15, 2009 (edited) Jos, Out of interest I just ran this very short and pretty unrepresentative test: $sShort = 0 $sVeryMuchLongerVariable = 0 $nBegin = TimerInit() For $i = 1 To 10000000 $sShort = 1 Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) $nBegin = TimerInit() For $i = 1 To 10000000 $sVeryMuchLongerVariable = 1 Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) The results if I run with the short variable name first: Short: 3761 3861 3801 3792 Long: 3979 3934 3987 3936 and then with the long variable name first (always a good idea to reverse the order in any experiment*): Short: 3760 3789 3844 3759 Long: 3968 4016 4031 4016 Seems pretty clear that the shorter name is faster in this test by about 5% - which I find very surprising. >_< M23 * See RV Jones' book - Most Secret War $s = 0 $sVeryMuchLongerVariableeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee = 0 $nBegin = TimerInit() For $i = 1 To 10000000 $s = 1 Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) $nBegin = TimerInit() For $i = 1 To 10000000 $sVeryMuchLongerVariableeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee = 1 Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) 3032.95090577154 3517.51395777955 Huh....wow. Big difference. Edited August 15, 2009 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
nfaustin Posted August 27, 2009 Posted August 27, 2009 (edited) I got Error when run and compiling my script: ;From Original code Global $input1 = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE, $ES_WANTRETURN)) ;To Optimize code Global $BE = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($BY, $J, $BX, $BW)) And this are the Errors: E:\Tool_Optimize.au3(58,63) : WARNING: $BY: possibly used before declaration. Global $BE = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($BY, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\Tool_Optimize.au3(58,67) : WARNING: $J: possibly used before declaration. Global $BE = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($BY, $J, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\Tool_Optimize.au3(58,72) : WARNING: $BX: possibly used before declaration. Global $BE = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($BY, $J, $BX, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\Tool_Optimize.au3(58,77) : WARNING: $BW: possibly used before declaration. Global $BE = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($BY, $J, $BX, $BW) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\Tool_Optimize.au3(58,63) : ERROR: $BY: undeclared global variable. Global $BE = GUICtrlCreateEdit("", 5, 165, 450, 155, BitOR($BY, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Edit: Any ideas? Edited August 27, 2009 by nfaustin [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
Xenobiologist Posted August 27, 2009 Posted August 27, 2009 Hi, isn't that a case of - works as designed? It is normal that the interpreter needs to read the variable every time. Therefor the longer the variable the more time it takes. It reads line by line, or is there any kind of optimzing processes done on compile time? I think there is nothing, cause if you decompile the code, it looks the same as before. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Zedna Posted August 27, 2009 Posted August 27, 2009 Quote3032.950905771543517.51395777955Huh....wow. Big difference.Very surprising! That's 16% difference!!If that's true then Obfuscator should have new option for this optimization. Resources UDF ResourcesEx UDF AutoIt Forum Search
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