mardi 3 mars 2015

EASTL performance


Today I downloaded and created a sample project of the Electronic Arts STL implementation and the EA's vector is looks much slower for me than the standard. I just created 2 vectors and uploading them with 1 million of items:



void performance_test(void)
{
clock_t start;
clock_t end;


// EA

eastl::string strEA = "hello";
eastl::vector<eastl::string> vec_EA;

start = clock();
for (size_t i = 0; i < 1000000; i++)
{
vec_EA.push_back(strEA);
}

end = clock();
printf("EA %f\n", (double(end - start) / 1000));

// Standard

std::string strStandard = "hello";
std::vector<std::string> vec_Standard;

start = clock();
for (size_t i = 0; i < 1000000; i++)
{
vec_Standard.push_back(strStandard);
}

end = clock();
printf("Standard %f\n", (double(end - start) / 1000));
}


And the results are:



  1. EA 0.759000

  2. Standard 0.064000


So, is there anything what I'm doing wrong or I just missed something? The sample has been compiled with v100 platform toolset.




Aucun commentaire:

Enregistrer un commentaire