remove the funroll-loops switch
See original GitHub issueOn OpenBSD/macppc, using the -funroll-loops option causes a segfault with scipy. Proposed patch below just removes the optimization flag across the board though. In the OpenBSD ports tree, this flag is sometimes removed due to buggy results.
For what it’s worth gentoo also recommends against it: http://wiki.gentoo.org/wiki/GCC_optimization#But_I_get_better_performance_with_-funroll-loops_-fomg-optimize.21
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index ccd5e8d..3b9481c 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -202,7 +202,6 @@ class GnuFCompiler(FCompiler):
opt = ['-O2']
else:
opt = ['-O3']
- opt.append('-funroll-loops')
return opt
def _c_arch_flags(self):
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Optimize Options - Using the GNU Compiler Collection (GCC)
Unroll loops whose number of iterations can be determined at compile time or upon entry to the loop. -funroll-loops implies -frerun-cse-after-loop . This...
Read more >Remove Switch From Loop - Stack Overflow
Is there any way to remove the switch statement without compiling multiple variants of the for loop? Given that x86 has indirect branching, ......
Read more >Loop unrolling - Wikipedia
... (February 2008) (Learn how and when to remove this template message). Loop unrolling, also known as loop unwinding, is a loop transformation...
Read more >CPU2017 Result Flag Description - SPEC.org
For example -funroll-loops0 would disable unrolling of loops. -qopt-mem-layout-trans=4; [user] ... Linker toggle to specify qkmalloc linker library.
Read more >CPP/C++ Compiler Flags and Options
-finline-functions; -m64; -funroll-loops; -fvectorize ... Disable C++ exceptions (it may be better for embedded systems or anything where ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll let you argue this one with @juliantaylor 😉
Personally, I’ve found that judicious unrolling of loops can speed things up significantly, at least on older hardware. The keyword is probably ‘judicious’ 😉
will need to check. will come back here when i do. thanks.