[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] [task #6827] etharp could need some tuning
From: |
tmu |
Subject: |
RE: [lwip-devel] [task #6827] etharp could need some tuning |
Date: |
Tue, 19 Jun 2007 21:00:12 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.6 |
Quoting Goldschmidt Simon <address@hidden>:
> > That may be true for some architectures or compilers. But the loop in
>
> And it doesn't, for mine. On NIOS-II, a comparison is always register
> against register. Comparison against 0 is a comparison against r0 (which
> is bound to be 0). You have to have one register more, but I though
> maybe the compiler can optimize the for-loop better than the while
> (because the k-- is inside the body and not tight to the keyword like
> with for, is that right or not?).
I would assume modern compilers optimise use a broader scope and
such statement scheduling at high-level language is no longer
necessary ... if not even counterproductive.
> > question copies data 'backwards', i.e. accesses memory from higher to
> > lower addresses. That could level out the optimisation gained by
> > tweaking the loop abort criteria on some other architectures.
>
> That might also be. Anyway, I don't think it's that important anyway,
> just thought it's a strange way to do it (not the comparison against 0
> but using while instead of for when you know the size).
The optimisation using a constant instead of reading hw_addrlen(?)
is probably more useful than doing the work a decent compiler does
for you anyways.
FWIW, I'd be more concerned about latency cauded by memory
accesses than processor cycles caused by some additional operations
which use only local CPU resources.
--
Thomas
- [lwip-devel] [task #6827] etharp could need some tuning, (continued)
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/08
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/16
- [lwip-devel] [task #6827] etharp could need some tuning, Frédéric Bernon, 2007/06/17
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/18
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/18
- [lwip-devel] [task #6827] etharp could need some tuning, Frédéric Bernon, 2007/06/18
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/19
- [lwip-devel] [task #6827] etharp could need some tuning, Jonathan Larmour, 2007/06/19
- Re: [lwip-devel] [task #6827] etharp could need some tuning, Thomas Mueller, 2007/06/19
- RE: [lwip-devel] [task #6827] etharp could need some tuning, Goldschmidt Simon, 2007/06/19
- RE: [lwip-devel] [task #6827] etharp could need some tuning,
tmu <=
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/21
- [lwip-devel] [task #6827] etharp could need some tuning, Kieran Mansley, 2007/06/22
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/24
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/24
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/24
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/24
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/24
- [lwip-devel] [task #6827] etharp could need some tuning, Kieran Mansley, 2007/06/25
- [lwip-devel] [task #6827] etharp could need some tuning, Simon Goldschmidt, 2007/06/25
- [lwip-devel] [task #6827] etharp could need some tuning, Kieran Mansley, 2007/06/26