This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
RE: TCP/IP checksum routine performance
- To: <grante at visi dot com>
- Subject: RE: [ECOS] TCP/IP checksum routine performance
- From: "Alex Schuilenburg" <alexs at redhat dot com>
- Date: Tue, 2 May 2000 10:57:47 +0100
- Cc: "eCos Discuss" <ecos-discuss at sourceware dot cygnus dot com>
- Reply-To: <alexs at redhat dot com>
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