Optimizations and Smart Linking don't have effect lazarus / 9-Editor ---------------------------------------------------------------------- zoiddani · 2011-02-08 17:47 As the subjects says, when I change my optimizations, or just turn Smart Linking on in Compiler options, nothing changes to my speed, size, or compiling speed. What could I have done wrong? ---------------------------------------------------------------------- Leledumbo · 2011-02-08 17:56 Can you prove it? Check the generated assembly (-a[lnrt] compiler option). About the size, probably you could try "search" box above. Compiling speed should normally get slower when using optimizations, but it really depends on your project. Even Lazarus compiled with -O3 -OpPENTIUMM -CfSSE3 only takes 1-2 minute(s) on my machine. ---------------------------------------------------------------------- zoiddani · 2011-02-08 18:07 Well, my compiling is 1-2 secs. I just say it doesn't have any effect on my project. Also, when I click on Test, then it says "include search path contains non ASCII'. So i just click OK. Also I can't add watches to my project. here are some screenshots: http://img193.imageshack.us/img193/1483/watches.png http://img546.imageshack.us/img546/2245/kpkivgsc.png ---------------------------------------------------------------------- Leledumbo · 2011-02-09 04:58 I never had the first one. About the 2nd, please ensure the debugger isn't disabled in environment options. ---------------------------------------------------------------------- Martin_fr · 2011-02-09 11:11 About Debugging: - Make sure in Environments Optins, Debugging section, that the type selected is GDB, and that the field below points to a GDB executable. - In the "Project Options" dialog, on the linking page, you should have selected debug info (or dwarf). Either the one with "(-g)" in the description, or the one with "(-gw)". Optional also the one with "-gl" For Debugging, you MUST turn OFF, optimization and smart-linking You may already want to upgrade to the 0.9.29 fixes from snapshots. It is very close to what will be the 0.9.30 release soon. ----- About Smart-linking and optimization: Size: If you need a smaller  exec: - Ensure you disable all the debug info (that is the real big one) - Disable Assertation. But most time it will not do mutch.. - Smart linking. This may gain a little, depends a lot on what is in your app.   (and ensure all your units, packages, LCL, are compiled smart- linkable (that are 2 settings) - Size optimization -Os => talking a few bytes at best. Nothing really noticeable.   (only, if NO other optimization, this optimization contradicts speed )many (not all) optimization. An empty form should come to 1.6 or 1.7 MB. That is the smallest you get. (An empty program, without FORM, and without LCL "hello world" printed to console) can be smaller) ----- About Speed - disable Range, IO, Stack checking (-Cr, -Ct ...) - -Ox will improve, but only by a few percent. So if you got code that runs 3 minutes, it may get down to 2 and a half minutes. Don't expect wonders here. If you need to double your speed or more, you need to look at algorithms, and why yours takes that long