Re: [PATCH] net/core/flow.c: compare data with memcmp

2007-01-02 Thread David Miller
From: "Daniel_Marjamäki" <[EMAIL PROTECTED]> Date: Mon, 1 Jan 2007 10:16:02 +0100 > I have done a little testing on my own. My results is that memcpy is > many times faster even with aligned data. Your test program doesn't make any measurements, from where did you get these "results"? Also,

Re: [PATCH] net/core/flow.c: compare data with memcmp

2007-01-02 Thread David Miller
From: Daniel_Marjamäki [EMAIL PROTECTED] Date: Mon, 1 Jan 2007 10:16:02 +0100 I have done a little testing on my own. My results is that memcpy is many times faster even with aligned data. Your test program doesn't make any measurements, from where did you get these results? Also, your test

Re: [PATCH] net/core/flow.c: compare data with memcmp

2007-01-01 Thread Daniel Marjamäki
Hello! I have done a little testing on my own. My results is that memcpy is many times faster even with aligned data. I am testing in an ordinary console program. I am including the code below. If I'm doing something wrong, please tell me so. As you can see I am not using the same

Re: [PATCH] net/core/flow.c: compare data with memcmp

2007-01-01 Thread David Miller
From: "Daniel_Marjamäki" <[EMAIL PROTECTED]> Date: Mon, 1 Jan 2007 08:47:48 +0100 > So you mean that in this particular case it's faster with a handcoded > comparison than memcmp? Because both key1 and key2 are located at > word-aligned addresses? > That's fascinating. Essentially, yes.

Re: [PATCH] net/core/flow.c: compare data with memcmp

2007-01-01 Thread David Miller
From: Daniel_Marjamäki [EMAIL PROTECTED] Date: Mon, 1 Jan 2007 08:47:48 +0100 So you mean that in this particular case it's faster with a handcoded comparison than memcmp? Because both key1 and key2 are located at word-aligned addresses? That's fascinating. Essentially, yes. However, I

Re: [PATCH] net/core/flow.c: compare data with memcmp

2007-01-01 Thread Daniel Marjamäki
Hello! I have done a little testing on my own. My results is that memcpy is many times faster even with aligned data. I am testing in an ordinary console program. I am including the code below. If I'm doing something wrong, please tell me so. As you can see I am not using the same

Re: [PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread Daniel Marjamäki
Hello! So you mean that in this particular case it's faster with a handcoded comparison than memcmp? Because both key1 and key2 are located at word-aligned addresses? That's fascinating. Best regards, Daniel 2006/12/31, David Miller <[EMAIL PROTECTED]>: From: "Daniel_Marjamäki" <[EMAIL

Re: [PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread David Miller
From: "Daniel_Marjamäki" <[EMAIL PROTECTED]> Date: Sun, 31 Dec 2006 17:37:05 +0100 > From: Daniel Marjamäki > This has been tested by me. > Signed-off-by: Daniel Marjamäki <[EMAIL PROTECTED]> Please do not do this. memcmp() cannot assume the alignment of the source and destination buffers and

Re: [KJ] [PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread Nishanth Aravamudan
On 31.12.2006 [17:37:05 +0100], Daniel Marjam?ki wrote: > From: Daniel Marjamäki > This has been tested by me. > Signed-off-by: Daniel Marjamäki <[EMAIL PROTECTED]> > --- linux-2.6.20-rc2/net/core/flow.c 2006-12-27 09:59:56.0 +0100 > +++ linux/net/core/flow.c 2006-12-31

[PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread Daniel Marjamäki
From: Daniel Marjamäki This has been tested by me. Signed-off-by: Daniel Marjamäki <[EMAIL PROTECTED]> --- linux-2.6.20-rc2/net/core/flow.c2006-12-27 09:59:56.0 +0100 +++ linux/net/core/flow.c 2006-12-31 18:26:06.0 +0100 @@ -144,29 +144,16 @@ typedef u32 flow_compare_t;

[PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread Daniel Marjamäki
From: Daniel Marjamäki This has been tested by me. Signed-off-by: Daniel Marjamäki [EMAIL PROTECTED] --- linux-2.6.20-rc2/net/core/flow.c2006-12-27 09:59:56.0 +0100 +++ linux/net/core/flow.c 2006-12-31 18:26:06.0 +0100 @@ -144,29 +144,16 @@ typedef u32 flow_compare_t;

Re: [KJ] [PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread Nishanth Aravamudan
On 31.12.2006 [17:37:05 +0100], Daniel Marjam?ki wrote: From: Daniel Marjamäki This has been tested by me. Signed-off-by: Daniel Marjamäki [EMAIL PROTECTED] --- linux-2.6.20-rc2/net/core/flow.c 2006-12-27 09:59:56.0 +0100 +++ linux/net/core/flow.c 2006-12-31 18:26:06.0

Re: [PATCH] net/core/flow.c: compare data with memcmp

2006-12-31 Thread Daniel Marjamäki
Hello! So you mean that in this particular case it's faster with a handcoded comparison than memcmp? Because both key1 and key2 are located at word-aligned addresses? That's fascinating. Best regards, Daniel 2006/12/31, David Miller [EMAIL PROTECTED]: From: Daniel_Marjamäki [EMAIL PROTECTED]