akorx Posted December 3, 2010 Share Posted December 3, 2010 (edited) Hi, I'm french... so sorry for my bad english. How can we optimize compilation to have an exe that go faster ? I don't know which verb to use : "accelerate" ? "speed up" ? For exemple (it's just a exemple) : imagine you want to count to 1 to 10000000000... you make your .exe and run it and you see that it takes 60s to do the job... how make it go faster? Are there options during compilation that optimize size or speed of your program ? I know that the best way is to use assembly code but it's very difficult to use... Edited December 3, 2010 by akorx AkorxMail akorx@yahoo.fr Link to comment Share on other sites More sharing options...
JohnOne Posted December 3, 2010 Share Posted December 3, 2010 Their is no "Go faster" directive, its all about how your code is written, and what functions you use. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
UEZ Posted December 3, 2010 Share Posted December 3, 2010 It is in the nature of Autoit to take a relative long time to finish a loop like For $i = 0 to 2147483647 Next and you cannot speed it up using native Autoit commands! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
akorx Posted December 3, 2010 Author Share Posted December 3, 2010 And what about the compilation... in C++ for exemple you can choose between size or speed when you are complinig your program. AkorxMail akorx@yahoo.fr Link to comment Share on other sites More sharing options...
Mat Posted December 3, 2010 Share Posted December 3, 2010 And what about the compilation... in C++ for exemple you can choose between size or speed when you are complinig your program.AutoIt is not a compiled language. Once you understand that, everything becomes a lot easier to understand in this thread.When you "compile" an exe, you are (in simple terms) embedding the script in the interpreter. When you run the "compiled" result, the interpreter does what it normally does, only with the script.This has several advantages. Firstly, we can both compile and interpret our scripts, and there won't be difference between the two (unless you use @Compiled or something similar). Second, we can run other scripts using the interpreter in an "compiled" exe. This is very useful when you need to use multiple files.The disadvantages are that AutoIt will never be lightning fast. You will have to rely on clever coding, or using other languages with AutoIt. If you search the forums for embedding machine code in AutoIt I'm sure you'll find some examples, people have done quite a lot of work on it. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Zedna Posted December 3, 2010 Share Posted December 3, 2010 You can use #AutoIt3Wrapper_run_obfuscator=y #Obfuscator_parameters=/striponly at top of your script. Then compile it from FULL Scite4Autoit3 by F7 and it will strip all unused constants/funcs from script before compilation. Result is smaller and little faster compiled EXE. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
UEZ Posted December 3, 2010 Share Posted December 3, 2010 (edited) Even still a little bit faster should be #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0 but it is not a solution to speed up Autoit as Mat mentioned it is an interpreter language which will interpret your code in real time. Interpreter and scripting code will be saved in the exe. Br, UEZ Edited December 3, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 3, 2010 Share Posted December 3, 2010 Using /om and x64 interpreter is pretty much as good as it gets. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Mat Posted December 3, 2010 Share Posted December 3, 2010 Thinking out loud... But would not using upx speed up anything? It would mean a much exe though. AutoIt Project Listing Link to comment Share on other sites More sharing options...
James Posted December 3, 2010 Share Posted December 3, 2010 Thinking out loud... But would not using upx speed up anything? It would mean a much exe though.UPX is just a packer, I believe it has no affect on the speed of the compiled result. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
UEZ Posted December 3, 2010 Share Posted December 3, 2010 UPX compresses the exe and of course it takes some more milli seconds to unpack and start the exe. A non packed exe starts faster than a packed exe but I think not relevant for Autoit executables. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
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