------- Additional Comments From kevin at planetsaphire dot com 2005-08-28 21:58 ------- (In reply to comment #6) > inlining memset is not an optimization as most OS's memsets are better than the inlined version, using > sse registers,etc.
I have finished reviewing over the glibc memset.* source files for the 32-bit Intel platforms, simply because every one using Linux is using glibc as the "libc". I find that SSE (nor even MMX) is used in the 32-bit implementations of memset. I think it is best to change this bug into an enhancement for the next available GCC branch. The reason for this change is because of a few reasons: 1. Fedora Core 3 (the distro installed on my computer) does not install the i686 binaries of glibc during install; rather, it installs the i386 version. 2. You are right about systems having better memset()s, though considering the widespread use of glibc, most implementations do not utilize SSE, MMX, etc. Maybe the memset() optimization can be turned on by the use of a new flag? After all, the i386 build of glibc does not include the use of instructions that can possibly be used on i686. In addition, there may be a few circumstances where the user may not want to use the i686 build, such as debugging, apps that require the i386 build (perhaps to get around a few glibc bugs), and hardware processor issues with other functions in glibc. I hope the GCC staff and the steering committee reviews over this possible enhancement seriously. The optimization would allow the user to get around slower code in certain situations when it comes to using memset(). -- What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |enhancement Status|RESOLVED |UNCONFIRMED Priority|P2 |P1 Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23605