memset()

Excuse me if I am asking a ignorant question,

I was wondering if anyone experience this function memset() in QNX 6.2.
We are suspecting a performance issue due to many calls to memset() in our
application.

From what I was told QNX memset() is putting 4 bytes memory to copy and loop
of 4-byte copy if more data to copy.

Do you know if this is optimized, or is there another version of better
memset() existing that anyone is using?


Regards,
Arthur Yung

Arthur Yung <ayung@tex.telusa.com> wrote:

Excuse me if I am asking a ignorant question,

I was wondering if anyone experience this function memset() in QNX 6.2.
We are suspecting a performance issue due to many calls to memset() in our
application.

Have you actually run gprof on the code to see if this is actually the case?

From what I was told QNX memset() is putting 4 bytes memory to copy and loop
of 4-byte copy if more data to copy.

Do you know if this is optimized, or is there another version of better
memset() existing that anyone is using?

You can get the memset() code here:
http://cvs.qnx.com/cgi-bin/cvsweb.cgi/lib/c/string/memset.c?rev=1.1.1.1&content-type=text/x-cvsweb-markup

You could attempt to unroll the loop a little, but gcc will normally do
that for you already.

What CPU are you guys using?

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

This was discussed several months ago in one of the qdn.public.qnxrtp
groups. If I remember correctly Bill Caroselli posted an optimized memset at
that time.

Marty Doane
Siemens Dematic


“Arthur Yung” <ayung@tex.telusa.com> wrote in message
news:as0o6m$pbb$1@inn.qnx.com

Excuse me if I am asking a ignorant question,

I was wondering if anyone experience this function memset() in QNX 6.2.
We are suspecting a performance issue due to many calls to memset() in our
application.

From what I was told QNX memset() is putting 4 bytes memory to copy and
loop
of 4-byte copy if more data to copy.

Do you know if this is optimized, or is there another version of better
memset() existing that anyone is using?


Regards,
Arthur Yung

Nope, that was memmove(). And the current memmove() is doing byte-wise copies.

chris


Marty Doane <marty.doane@rapistan.com> wrote:

This was discussed several months ago in one of the qdn.public.qnxrtp
groups. If I remember correctly Bill Caroselli posted an optimized memset at
that time.

Marty Doane
Siemens Dematic


“Arthur Yung” <> ayung@tex.telusa.com> > wrote in message
news:as0o6m$pbb$> 1@inn.qnx.com> …
Excuse me if I am asking a ignorant question,

I was wondering if anyone experience this function memset() in QNX 6.2.
We are suspecting a performance issue due to many calls to memset() in our
application.

From what I was told QNX memset() is putting 4 bytes memory to copy and
loop
of 4-byte copy if more data to copy.

Do you know if this is optimized, or is there another version of better
memset() existing that anyone is using?


Regards,
Arthur Yung

\


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

I posted a memmove().

I needed it for a data base engine that pushed hundreds of millions of
records around in RAM.

“Marty Doane” <marty.doane@rapistan.com> wrote in message
news:as2tki$atb$1@inn.qnx.com

This was discussed several months ago in one of the qdn.public.qnxrtp
groups. If I remember correctly Bill Caroselli posted an optimized memset
at
that time.

Marty Doane
Siemens Dematic


“Arthur Yung” <> ayung@tex.telusa.com> > wrote in message
news:as0o6m$pbb$> 1@inn.qnx.com> …
Excuse me if I am asking a ignorant question,

I was wondering if anyone experience this function memset() in QNX 6.2.
We are suspecting a performance issue due to many calls to memset() in
our
application.

From what I was told QNX memset() is putting 4 bytes memory to copy and
loop
of 4-byte copy if more data to copy.

Do you know if this is optimized, or is there another version of better
memset() existing that anyone is using?


Regards,
Arthur Yung
\