This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: TCP/IP checksum routine performance


Hi Grant

Some feedback from one of our compiler engineers on your performance issues:


:    assembly routine:   5.04 seconds
:    C routine w/ -O0:  10.62 seconds
:    C routine w/ -O1:  15.95 seconds
:    C routine w/ -O2:  15.95 seconds
:    C routine w/ -O3:  15.95 seconds

Note - did you check with -Os.  This may have produced better
results in this particular case.


: The really odd thing is that the code generated by gcc -O[123]
: is 50% slower than the code generated with -O0.  At first I
: thought there was something wrong with my test procedure, but
: when I looked at the assembly language gnerated with
: optimization on, it's indeed about 50% longer.

It sounds like loop unrolling is causing the code to exceed the
instruction cache size....

So compiling with '-O3 -fno-unroll-loops' might produce good
results.

Cheers
-- Alex



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]