[Bug 1753] New: Use -funroll-loops with umac.c

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Sat Apr 10 08:18:43 EST 2010


https://bugzilla.mindrot.org/show_bug.cgi?id=1753

           Summary: Use -funroll-loops with umac.c
           Product: Portable OpenSSH
           Version: -current
          Platform: Itanium
        OS/Version: Other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Build system
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: imorgan at nas.nasa.gov


By default, umac.c is compiled with -O2 and performs well on x86 and
x86_64 architectures. However, on other architectures the performance
can be improved by adding -funroll-loops.

Using Ted Krovetz's original code, the performance for 1KB blocks on
various architectures (clocks per byte) is as follows:

        gcc -O2         gcc -O2 -funroll-loops
x86_64: 0.95            1.04
IA64:   2.31            1.36    -funroll-loops
SPARC:  9.52            9.50
POWER5: 3.88            3.67

The architecture that benefits the most from this is IA64. A
memory-to-mekory test using ssh on a 1.5 GHz Itanium system shows an
improvement of approximately 9 MB/s; 128 MB/s with just -O2 and 137
MB/s
when -funroll-loops is added.

It may be worthwhile adding the following to Makefile.in:

umac.o: umac.c
        $(CC) $(CFLAGS) -funroll-loops $(CPPFLAGS) -c $?

Admittedly, it has to be acknowledged that this would be slightly
detrimental to x86_64 and for architectures other than IA64 the benefit
appears to be marginal.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list