[Webkit-unassigned] [Bug 23501] Overlapping memcpy in TestDecoder::reset

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 27 12:13:58 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=23501





------- Comment #7 from darin at apple.com  2009-01-27 12:13 PDT -------
(In reply to comment #6)
> (In reply to comment #5)
> > Sounds like http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667

Good to know!

> I could implement a custom operator=() that did the obvious thing, that would
> probably avoid the memcpy() on the structure assignment. It's not really a big
> deal, but it seems nice to avoid the poorly generated code.

I think it's OK to do that either as a performance optimization, or to make it
easier to use the tool that detects overlapping memcpy. Neither seems a
compelling important reason to make the change to me. We normally optimize
performance in three ways: 1) when we can measure the difference, 2) choosing
good algorithms, 3) cultivating habits that make the code fast. I'm not sure
this qualifies for any of those.

On the other hand, if this would make it easier to use that overlapping memcpy
tool, then we could put the code in on that basis. I suspect we might have to
add it to classes other than TextEncoding too in the future.

Either way is OK.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list