This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Strict aliasing affects glibc 2.1.1 as well as Linux


> Good question!  Are people really saying that it will not be possible to
> get good performance unless you use assembly?  And that this probably can
> be solved by tabulating all useful assembly routines as builtins?  Let's
> hope not.

Well, it depends on what you want to implement. If you want to find
the shortest path in a graph, there it is very possible to implement
that efficiently in portable C. If you want to implement memcpy
efficiently, you either have to use assembly, or some non-portable
mechanism of your compiler.

> 	Rephrasing the part about "control" in terms of
> "expressiveness" : GOOD compilers don't require __builtin_memcpy to
> be written in assembly.

I'm not sure what you are saying here. One way to read it is: C is not
a GOOD language to write portable programs in.

> 	If the alternative to having __norestrict is that lots and
> lots of code is written in assembly, then I would hope that people
> would allow an extra dimension of expressiveness be added to C.

What you seem to be missing is that most people don't want to write
memcpy. Instead, they use the library routine that does what they
want, and which might be specialised for the hardware they are
targeting.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]