[HN Gopher] Go 4x faster: wrap your existing tight loops in func...
       ___________________________________________________________________
        
       Go 4x faster: wrap your existing tight loops in functions till a
       compiler fix
        
       Author : reportaman
       Score  : 16 points
       Date   : 2023-10-03 20:22 UTC (2 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | reportaman wrote:
       | Shows go compiler still has perf tuning to be done, and language
       | might see decent speedup in applications where tight loops
       | matter.
        
       | 32gbsd wrote:
       | It's seems like we are treading old ground
        
         | reportaman wrote:
         | Please post a link here.
        
       | devit wrote:
       | "I think this is a consequence of variables being sent to a
       | channel effectively having their address taken, disabling
       | register allocation for them."
       | 
       | Looks like the Go code generator and optimizer is absolutely
       | terrible, since any reasonable optimizer has standard
       | optimizations that prevent this.
       | 
       | Apparently they wrote their own rather than using something
       | established like LLVM, and this is the result.
        
         | pdpi wrote:
         | > Apparently they wrote their own rather than using something
         | established like LLVM, and this is the result.
         | 
         | Go is self-hosted, and compilation is much faster than any
         | LLVM-based compiler I know. Those are valuable properties. We
         | can argue about how valuable, but it's not nearly as simple as
         | a case of NIH as you're implying.
        
       ___________________________________________________________________
       (page generated 2023-10-03 23:01 UTC)