Re: Direct Copying To Share Memory In NDIS ProtocolReceive

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Le Chaud Lapin" <jaibuduvin@xxxxxxxxx> wrote in message
If I was in the OP's place, if would first try to do everything "stupid
and
simple", and see how it all works - I wold start thinking about
optimization
if and only if I am not happy with the performance. However, the OP
starts
thinking about it in the very beginning of his project.

That is the way I work. I think about the end result, then spend much
time thinking about how I can get there without doing anything. I
mull, which is what I am doing now.

According to Knuth, " in 95% of cases optimization is mother of all
evil". I
think that there is a good chance that the OP's case falls into these
95%

Actually, I believe Knuth said "Premature optimization is the root of
all evil." In this case, the optimization is not premature, any more
than considerations of optimization would be premature in the design
of a hash-based associative set. The whole reason for even considering
the design I had in mind was optimization. So in this case, my form
is driven by optimization. If the goal where simply to receive and
transmit packets, I would have just done that.

But you are right, I definitely should consider whether it is worth
deviating from something "normal", which is why I was trying to get an
indication of how much performance increase I could expect on packet
receive indications.

Well all I can say is for small transfers like packet size data, I have
never seen an increase for anyone who has played these games. I have seen
a decrease in most cases of 10 to 30 percent or more, since they have
overhead on keeping track of things that overrides the improvements.

Now, on huge transfers (things like 4MB packets and 20 or more of those a
second) it can make a difference, but network traffic doesn't make that
model.

Personally, I believe Anton's advice is absolutely correct, do it simple
and clean. Then you can experiment, remember even if it is faster, unless
it is significant you have to trade that off against the likely decrease in
reliability you are creating for the system.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


.



Relevant Pages

  • Re: Server Programmierung: performance Steigerung durch Verteilung von Verbindungsanfragen auf mehre
    ... Einschränkung bei seiner Applikation nicht gegeben. ... "Premature optimization is the root of ... Event-Systems bei bestem Willen nicht was er unter "premature ... Optimieren bevor man Zahlen hat. ...
    (de.comp.os.unix.programming)
  • Re: Server Programmierung: performance Steigerung durch Verteilung von Verbindungsanfragen auf mehre
    ... die Grundregel der Optimierung: "Premature optimization is the root of ... Event-Systems bei bestem Willen nicht was er unter "premature ... Falls Skalierbarkeit eine Anforderung an die Applikation ist, ...
    (de.comp.os.unix.programming)
  • Re: Cons cell archaic!?
    ... In the classic case of premature ... optimization, the optimization takes place before the design is done, or ... fight to keep our lisp running in 2 Mb or less (and we've kept the base ... don't forget the extra complexity CDR coding would entail at the ...
    (comp.lang.lisp)
  • Re: Cons cell archaic!?
    ... the question "premature to what?". ... optimization, the optimization takes place before the design is done, ... continuing to fight to keep our lisp running in 2 Mb or less (and ... to implement cdr-coding efficiently, we would do so. ...
    (comp.lang.lisp)
  • Re: How much would variable declarations in Ruby make you wince?
    ... actually looked 'optimization' up, I may define it more loosely than ... I'd suggest that the phrase "premature ... (By canon, I mean, "the body of rules, principles, or standards ... The purpose of refactoring is to improve code by ...
    (comp.lang.ruby)