I'm here to ask about some concepts that can make this process faster:
foreach($xml->results->concepts->concept as $value2){//This is the original game.
$total_concepts++;
foreach($xml1->results->concepts->concept as $value1){//This is similar game.
$total_similar_concepts++;
if(strcmp($value2->name, $value1->name)==0){
$comparisons++;
break;
}
}
}
Essentially, I'm comparing each 'concept' of the original game to each 'concept' of each 'similar' games.
This algorithm takes about 11.6 seconds on average to complete. Is there something I can do to make this run faster? I was thinking that perhaps parsing it as xml wasn't the best I could do.