« Return to Thread: Mutli index container - performance varation when erasing large amount of rows in different computers

Re: Mutli index container - performance varation when erasinglarge amount of rows in different computers

by Joaquin M Lopez Munoz :: Rate this Message:

Reply to Author | View in Thread

Avi Revivo <revivoavi <at> hotmail.com> writes:

[...]

> After dissecting i found out that the only problem is the the actual
> invocation of delete().
>
> Code executed:
> **********************************************************
>
>             int *arrayOfPointers[100000];
>
> for(int i = 0; i < 100000; i++)
> {
> arrayOfPointers[i] = new int;
> }
>
> for(int i = 0; i < 100000; i++)
> {
> delete arrayOfPointers[i];
> }
>
> **********************************************************
>
> Excuting the for loop that deletes takes 25 times slower then any other
> computer tested. The average time for a single delete operation is longer in
> by factor of 25.

Umm... Still it looks like a cache issue. Can you try doing the
deleteion in reverse order, from 99999 down to 0? Any difference,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

 « Return to Thread: Mutli index container - performance varation when erasing large amount of rows in different computers