***SPAM*** Re: ***SPAM*** Re: [ofa-general] Re: [PATCH] Add pkey table support to osm_get_all_port_attrs

Hal Rosenstock hal.rosenstock at gmail.com
Fri Feb 27 08:39:00 PST 2009


Sasha,

On Fri, Feb 27, 2009 at 7:49 AM, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> On 06:33 Fri 27 Feb     , Hal Rosenstock wrote:
>> >>
>> >> ?? ?? ?? ??memset(attr_array, 0, sizeof(attr_array));
>> >>
>> >> would be enough.
>> >
>> > Sure; next version.
>>
>> The thought above is that it is more efficient to just initialize the
>> needed fields rather than the entire array which is not required.
>
> I don't know for sure about this specific example, but normally memset()
> is heavily optimized function so I would expect at least comparable
> performance here.

It's minor but memset is slower for this.

-- Hal

> Sasha
>



More information about the general mailing list