Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/ic
> > > Eh ???
> > > if (foo) bar(); else baz();
> > > will probably execute faster than:
> > > (*bar_baz)();
> > > since the indirect jump is (IIRC) always unpredicted.
> >
> > What do you have to predict on unconditional branches?
>
> The branch destination. E.g. the CPU can't start prefetching from the
> bar().
Probably you guys should check diffs first:
+ if (sc->write_mbuf == NULL)
+ sc->write_mbuf = dp8390_write_mbuf;
:
- if (sc->write_mbuf)
- len = (*sc->write_mbuf)(sc, m0, buffer);
- else
- len = dp8390_write_mbuf(sc, m0, buffer);
+ len = (*sc->write_mbuf)(sc, m0, buffer);
i.e.
+ if (!foo) foo = bar;
:
- if (foo) (*foo)() else inlined_bar()
+ (*foo)()
Few (no?) drivers use the latter inlined one
so no befefit of prefetch with predict.
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index