Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-11 Thread Chris Moore
Mike Frysinger a écrit : > On Friday 09 October 2009 06:11:16 Mark Jackson wrote: > >> Chris Moore wrote: >> >>> I agree wholeheartedly with the idea but shouldn't it be more like this >>> (untested) code : >>> >>> void * memcpy(void *dest, const void *src, size_t count) >>> >>> { >>> c

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-09 Thread Wolfgang Denk
Dear Chris Moore, In message <4acebf19.4010...@free.fr> you wrote: > > I agree wholeheartedly with the idea but shouldn't it be more like this > (untested) code : Thanks for catching this. Of course you are right - my code was untested as well, as usual ;-) Best regards, Wolfgang Denk -- DE

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-09 Thread Mark Jackson
Chris Moore wrote: > I agree wholeheartedly with the idea but shouldn't it be more like this > (untested) code : > > void * memcpy(void *dest, const void *src, size_t count) > > { > char *d8, *s8; > unsigned long *dl = dest, *sl = src; > In here, would it be overkill to add byte co

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Chris Moore
Wolfgang Denk a écrit : > I think we should change this if-else into a plain if, something like > that: > > void * memcpy(void *dest, const void *src, size_t count) > { > char *tmp = (char *) dest, *s = (char *) src; > char *d8 = (char *)dest, *s8 = (char *)src; > unsigned long *d

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Wolfgang Denk
Dear Alessandro Rubini, In message <20091008160026.ga9...@mail.gnudd.com> you wrote: > > No interest in the suggestion to not require count to be an exact > > multiple of 4/8? > > Actually, I wrote about that in my patch 0/3. Hm. Your argument was not exctly convincing, though. > Currently, I d

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Wolfgang Denk
Dear Alessandro Rubini, In message <45d5e3a574bf4844f46f50b2c88054a5b28f973b.1255000877.git.rubini@ unipv.it> you wrote: > From: Alessandro Rubini > > Signed-off-by: Alessandro Rubini > Acked-by: Andrea Gallo > --- > lib_generic/string.c | 17 + > 1 files changed, 13 insert

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Wolfgang Denk
Dear Alessandro Rubini, In message <20091008191734.ga13...@mail.gnudd.com> you wrote: > > > In any case, my only suggestion would be that if we're improving > > memcpy()/memset(), do the extra 10% of effort required to make them a > > little better. That 10% of effort will improve 15.2% of all m

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
> The statistics are going to be very different for different scenarios. Yes, I know. > For example, network operations seem to be the majority of your large > memcpys, this isn't the case for everyone. True. I noticed it after sending -- although I expected it. > In any case, my only suggestio

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Mike Frysinger
On Thursday 08 October 2009 07:30:02 Alessandro Rubini wrote: > + if ( (((int)dest | (int)src | count) & (sizeof(long) - 1)) == 0) { when i talked about changing the int cast, i was talking about the pointers. pointers should always be cast to (unsigned long). -mike signature.asc Descripti

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Peter Tyser
On Thu, 2009-10-08 at 20:23 +0200, Alessandro Rubini wrote: > >> That's true, but I think the most important case is lcd scrolling, > >> where it's usually a big power of two -- that's where we had the #ifdef, > >> so the problem was known, I suppose. > > > > I think the most important case for *y

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
>> That's true, but I think the most important case is lcd scrolling, >> where it's usually a big power of two -- that's where we had the #ifdef, >> so the problem was known, I suppose. > > I think the most important case for *you* is lcd scrolling, but for 99% > of everyone else, it isn't at all:

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Peter Tyser
On Thu, 2009-10-08 at 18:00 +0200, Alessandro Rubini wrote: > > No interest in the suggestion to not require count to be an exact > > multiple of 4/8? > > Actually, I wrote about that in my patch 0/3. Sorry, I should have read more thoroughly. > > I don't think it would be that hard to update th

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
> No interest in the suggestion to not require count to be an exact > multiple of 4/8? Actually, I wrote about that in my patch 0/3. > I don't think it would be that hard to update the logic accordingly > and this would let your code be utilized much more often, especially > if/when we run on a 6

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Peter Tyser
On Thu, 2009-10-08 at 13:30 +0200, Alessandro Rubini wrote: > From: Alessandro Rubini > > Signed-off-by: Alessandro Rubini > Acked-by: Andrea Gallo > --- > lib_generic/string.c | 17 + > 1 files changed, 13 insertions(+), 4 deletions(-) > > diff --git a/lib_generic/string.c

[U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
From: Alessandro Rubini Signed-off-by: Alessandro Rubini Acked-by: Andrea Gallo --- lib_generic/string.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib_generic/string.c b/lib_generic/string.c index 181eda6..9911941 100644 --- a/lib_generic/string.