User talk:Qwertyus

Welcome!
Welcome to Wikibooks, Qwertyus!  First steps tutorial Wikibooks is for freely-licensed collaboratively-developed textbooks. You don't need technical skills in order to contribute here. Be bold contributing and assume good faith about the intentions of others. Remember, this is a wiki, so you're allowed to change just about anything, and changes can be made easily. Come introduce yourself to everyone, and let us know what interests you.

If you're coming here from other Wikimedia projects, you should read our primer for Wikimedians to get quickly up-to-speed.  Getting help  Goodies, tips and tricks  Made a mistake? Thanks, --Adrignola talk contribs 17:12, 28 August 2009 (UTC) (P.S. Would you like to provide feedback on this message?)
 * See the Wikibooks help pages for common issues, or read Using Wikibooks for a more user-friendly introduction to the project.
 * Remember, every edit is saved, so if you make mistakes, you can revert to an earlier version if needed.
 * Get help from the community in the Reading room or in our IRC channel.
 * You cannot upload an image until you have been a member for at least 4 days. If your upload is tagged with, , or , please read the template message as it explains the violation of our media policy. Please be sure to provide the required : a license tag and source citation are always required; fair use images require a . Get help in the user assistance room.
 * Please fill in the edit summary and preview your edits before saving.
 * Sign your name on discussion pages by typing &#126;&#126;&#126;&#126;
 * User scripts can make many tasks easier. Look at the Gadgets tab of my preferences; check off the boxes for the scripts you want, and hit save!
 * Please make sure you follow our naming policy - modules should be named like.
 * Need to rename a page? Use the move tab (only become available once your account is 4 days old - until then, ask for help).
 * To get a page deleted, add to the top of the page.
 * If something you wrote was deleted, please read the deletion policy, and check the deletion log to find out why. Also check the VFD archives if applicable. You can request undeletion at WB:VFU, or ask the administrator who deleted the page.

Speedy Deletions
I've answered your recent question at Talk:Using Wikibooks/Deleting, Undeleting, and Importing. --ЗAНИA talk 16:14, 5 April 2014 (UTC)

Optimizing C++
Can you please explain to readers why attempts to outsmart compilers is a bad idea, and why alloc is dangerous? Someone who does not understand the disadvantages of certain optimizations may later recommend those approaches again, and an explanation of the disadvantages would provide balance and allow readers to make a more educated decision for themselves whether to use certain optimizations or not. --dark lama  14:55, 3 June 2014 (UTC)


 * Actually the entire book is about trying to outsmart the compiler, and I'm not sure what to do about that just yet. Qwertyus (discuss • contribs) 15:27, 3 June 2014 (UTC)


 * Optimization is often about trying to outsmart the compiler, or about trying to improve what people write to assist the compiler in doing its job better. I think improving what people write to let the compiler do its job is often preferable, but at times a multitude of optimizations are needed to address bottlenecks that a compiler cannot fix on its own. I think understanding when to optimize, when optimization is premature, good and poor motivations to optimize, and the advantages and disadvantages of discussed optimizations is key to teaching people and helping people to understand optimizations.


 * Sometimes the person doing the optimization is a compiler writer as well, in which case the person may be trying to outsmart the CPU, work around CPU bugs, or address CPU bottlenecks. --dark lama  15:53, 3 June 2014 (UTC)


 * The chapters of this book that I've seen so far present faulty analyses of low-level hacks and their perceived necessity (e.g. the suggestion that comparison operators are branch instructions: complete nonsense) even when more readable/portable idioms are possible that actually allow the compiler to do its work optimizing the code.
 * Good optimizations work with the compiler to get fast code. Working against the compiler by writing tricky, hard to analyze code is a dead end in the long run. When the next release of the compiler comes out, the idiomatic solution may now be optimized, but the obfuscated version not because the compiler doesn't understand it. Qwertyus (discuss • contribs) 18:38, 3 June 2014 (UTC)


 * I think we agree on the purpose of optimization. I initiate discussion mainly to encourage you to teach and explain these things in the book, by replacing faulty analyses with good analyses, faulty C++ example with good C++ examples, etc. Books should include explanations and instruct readers. External links should be used sparingly and should be auxiliary to the main text. Books should contain all that a person would need to learn to understand the topic. People should be able to read books offline and without need to refer to other sources. External sources should mainly serve to further a person's learning beyond the scope of a book and to aid fact-checking and verification of what is taught. --dark lama  19:09, 3 June 2014 (UTC)


 * I already made some additions to the book. Would you care to review them? Qwertyus (discuss • contribs) 19:11, 3 June 2014 (UTC)