netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell Stuart <russell-lartc@stuart.id.au>
To: hadi@cyberus.ca
Cc: netdev@vger.kernel.org, lartc@mailman.ds9a.nl
Subject: Re: [PATCH] TC: bug fixes to the "sample" clause
Date: Sat, 18 Mar 2006 15:10:00 +1000	[thread overview]
Message-ID: <1142658600.4218.39.camel@ras.pc.stuart.local> (raw)
In-Reply-To: <1142606049.5322.89.camel@jzny2>

On Fri, 2006-03-17 at 09:34 -0500, jamal wrote:
> - the 2.4 algorithm performs very poorly for < 8 bits if you use a
> standard mask for ALL cases except when you use a lot of memory, most of
> which is _wasted_, in which case it performs equally. There are only 8
> masks in an 8 bit ranging from length of 1 to 8. Should not be hard to prove
> or disprove. Should be very easy to see when you plot.

Agreed.

> - You made the claim the 2.6 algorithm performs poorly if you had
> a 16 bit mask. You showed one sample of data. I dont even remember your
> sample anymore because you keep bombarding me with a lot of claims.
> I gave you the parameters which will help convince me. I showed you a 
> sample using similar parameters why the old one was buggy in the case of 
> 8 bits. There are only 16 possible masks for 16 bits (of length 1-16).
> Why cant you just give me similar results? Why do we have to go back
> and forth with a lot of hand waving when we can settle this easily?

I guess there are a couple of points here I don't understand:

- I don't see how 2.4 was "buggy", but perhaps we have different
  definitions of buggy.  I regard giving the wrong result as
  buggy.  Neither algorithm does that.

- I don't understand your point about "there are only 16 
  possible masks for 16 bits".  What do you want me to show?

> I will not respond to any further emails which do not contain 
> data - instead I am going to produce mine.

Put the 2.4 vs 2.6 argument aside.  The best solution as is 
to adopt the "new" algorithm I proposed.  Here is why:

1.  It can emulate either the 2.4 or 2.6 algorithm by a
    suitable choice of mask.  I can prove formally this 
    if you need me to.

2.  There is no dataset where the "new" algorithm is slower 
    than either 2.4, or 2.6.  This follows from (1).

3.  There are datasets where it is faster than the 2.6,
    algorithm, and datasets where it is faster than the
    2.4 algorithm.

    This follows from the fact that there are datasets
    where 2.6 is faster than 2.4, and there are datasets
    where 2.4 is faster than 2.6.  I think you know this
    already, but if not I can give some simple examples
    to prove it - just ask.

4.  Timing.  If we are going to change the algorithm,
    this is the time to do it - while the algorithm in
    "tc" is wrong and must be changed anyway.

For your convenience I have cut & pasted from the previous
email the comparison of the 2.4, 2.6 and "new" algorithm:

  2.4 Algorithm:           2.6 algorithm:       New Algorithm:
  --------------           --------------       --------------
  hash = (hash>>16)^hash;  hash = hash>>shift;  hash = hash>>shift;
  hash = (hash>>8)^hash;   return hash & 0xff;  hash = (hash>>16)^hash;
  return hash & 0xff;                           hash = (hash>>8)^hash;
                                                return hash & 0xff;

  parent reply	other threads:[~2006-03-18  5:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10  2:33 [PATCH] TC: bug fixes to the "sample" clause Russell Stuart
     [not found] ` <1142082696.5184.53.camel@jzny2>
2006-03-13  4:44   ` Russell Stuart
     [not found]     ` <1142269090.5242.29.camel@jzny2>
2006-03-13 17:55       ` Patrick McHardy
2006-03-13 18:04         ` Stephen Hemminger
2006-03-13 18:15           ` Patrick McHardy
2006-03-13 19:02           ` Patrick McHardy
2006-03-13 21:43           ` Russell Stuart
2006-03-13 21:50             ` Stephen Hemminger
2006-03-14  0:31               ` Russell Stuart
     [not found]                 ` <1142303082.5219.16.camel@jzny2>
     [not found]                   ` <1142306212.17608.178.camel@ras.pc.brisbane.lube>
     [not found]                     ` <1142307572.5219.73.camel@jzny2>
     [not found]                       ` <1142312708.17608.270.camel@ras.pc.brisbane.lube>
     [not found]                         ` <1142436098.5346.3.camel@jzny2>
     [not found]                           ` <1142470323.17608.341.camel@ras.pc.brisbane.lube>
     [not found]                             ` <20060315165757.44bf1548@localhost.localdomain>
2006-03-16  1:43                               ` Russell Stuart
     [not found]                             ` <1142472481.5417.20.camel@jzny2>
     [not found]                               ` <1142476647.17608.394.camel@ras.pc.brisbane.lube>
     [not found]                                 ` <1142478478.5417.46.camel@jzny2>
     [not found]                                   ` <1142488027.17608.485.camel@ras.pc.brisbane.lube>
     [not found]                                     ` <1142517116.5417.137.camel@jzny2>
2006-03-16 23:24                                       ` Russell Stuart
     [not found]                                         ` <1142606049.5322.89.camel@jzny2>
2006-03-18  5:10                                           ` Russell Stuart [this message]
2006-03-20  3:11                                           ` Russell Stuart
2006-03-14  2:29   ` Russell Stuart
     [not found]   ` <1142085718.5184.73.camel@jzny2>
     [not found]     ` <1142088594.4199.115.camel@ras.pc.stuart.local>
     [not found]       ` <1142092598.5184.93.camel@jzny2>
2006-03-14  2:45         ` Russell Stuart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1142658600.4218.39.camel@ras.pc.stuart.local \
    --to=russell-lartc@stuart.id.au \
    --cc=hadi@cyberus.ca \
    --cc=lartc@mailman.ds9a.nl \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).