Re: [OT] Re: memcpy() vs. for() performance
From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 07/01/04
- Next message: Default User: "Re: [OT] Re: CGI Programming in C on Xitami Web Server"
- Previous message: Dan Pop: "Re: memcpy( dest, src, 0 )"
- In reply to: Case: "[OT] Re: memcpy() vs. for() performance"
- Next in thread: Case -: "Re: [OT] Re: memcpy() vs. for() performance"
- Reply: Case -: "Re: [OT] Re: memcpy() vs. for() performance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 1 Jul 2004 16:32:01 GMT
In <40e40d8c$0$93324$e4fe514c@news.xs4all.nl> Case <no@no.no> writes:
>Dan Pop wrote:
>>
>> When the size is unknown at compile time (or too large), the compiler
>> cannot inline the memcpy call, it will call the library version.
>
>When I had to make a choice between the two, I would call it
>call it optimization. I'm surprized that you seem to prefer the
>term inlining. Why?
Because this is the specific name of that particular optimisation.
What is so difficult to understand?
As I said, inlining is NOT the only way an implementation can optimise
a memcpy call. There are plenty of optimisations that can be applied
to the library version of memcpy (especially if it's not written in C).
>> If you want ultimate answers, benchmark the two versions yourself.
>> Keep in mind that they cannot be extrapolated to other implementations.
>
>Yep, one other good reason to always use memcpy(). However, how was
>the saying again .... "Never say always!" :-)
Another failed attempt at humour...
Dan
-- Dan Pop DESY Zeuthen, RZ group Email: Dan.Pop@ifh.de
- Next message: Default User: "Re: [OT] Re: CGI Programming in C on Xitami Web Server"
- Previous message: Dan Pop: "Re: memcpy( dest, src, 0 )"
- In reply to: Case: "[OT] Re: memcpy() vs. for() performance"
- Next in thread: Case -: "Re: [OT] Re: memcpy() vs. for() performance"
- Reply: Case -: "Re: [OT] Re: memcpy() vs. for() performance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|