[gameprogrammer] Re: c++ template problem

To Robbert

Did you consider using STLPort at your work.
The implementation seems to be better.

Best regards,
Roma

On Wed, Jul 22, 2009 at 12:40 AM, Felde Norbert<fenor@xxxxxxxxxxx> wrote:
> We talked about my implementation of a math vector class and not about STL
> vector, in spite of that, you confirmed the answer of Roman and the previous
> answers.
> I should create my vectors as simple as able, still, it was a good excercise
> for me :)
>
> Thanks
> fenor
>
> Robbert de Groot írta:
>>
>> I wouldn't be too sure about that.  A case has hit us not too recently at
>> work.  One of my co-workers used an STL Vector for storage and this code was
>> to replace some C# equivalent code.  The C++ STL Vector code was running
>> about the same or slower than the C# code.  Which made us wonder what was
>> going on because we expected quite a significant improvement over the C#
>> code which was not optimised in any way.
>>
>> We replaced the code with a straight 'C' implementation and that gave us a
>> performance metric we were expecting, which was closer to taking half the
>> time as the C# implementation.  We tracked the issue down to some STL Vector
>> usage.  Admittedly it was a very simple implementation of the algorithm but
>> we didn't expect such poor performance.  We did eventually improve the
>> performance but it was a little bit of playing around with how to do things.
>>  Like traversing the vector in reverse order or something like that.
>>
>> STL implementations can vary wildly.  We were using MS VS 2005 and MS's
>> STL implementation.
>>
>> Robbert de Groot
>>
>>
>>
>>>
>>> From: Roman Hwang <hwang.roman@xxxxxxxxx>
>>>
>>> I'm not a professional, but I think vectors must be as efficient and
>>> optimized as possible. And inheritance is too much in this case.
>>>
>>
>>
>>
>>      __________________________________________________________________
>> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
>> favourite sites. Download it now
>> http://ca.toolbar.yahoo.com.
>>
>> ---------------------
>> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>>
>>
>>
>>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: