Now for the sake of argument, suppose this is back in the 1800s - before long-distance or radio communication. Image by Mecanismo, via Wikimedia Commons. You are a victim of branch prediction fail. gcc optimization flag -O3 makes code slower than -O2.Why is processing an unsorted array the same speed as processing a sorted array with modern x86-64 clang?. Related / followup Q&As about the same effect with different / later compilers and options: The code is summing up some independent terms, so the order should not matter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |