PHP ( temps d'exécution sur mon ordi 61ms ) :
Code : Tout sélectionner
<?php
$time_start = microtime(true);
$TEmployes = array();
for($t=1;$t<=200000;$t++){
$TEmployes['PureBasic']['Commercial']['Reference'.$t] = array(
'Prenom'=>'Pierre '.$t,
'Nom'=>'Dupond',
'Age'=>28
);
}
$Controle = 'Prénom du commercial <b>Reference9999</b> : '.$TEmployes['PureBasic']['Commercial']['Reference9999']['Prenom'].'<br/>';
$time_end = microtime(true);
$time = $time_end - $time_start;
echo $Controle.'Temps : '.($time*1000).' ms';
?>
Code : Tout sélectionner
EnableExplicit
Global t.L, TimeDebut.q, TimeFin.q
Structure Employe
Prenom.s
Nom.s
Age.L
EndStructure
Structure Service
Map Employe.Employe()
EndStructure
Structure Societe
Map Service.Service()
EndStructure
Global NewMap Societe.Societe()
TimeDebut = ElapsedMilliseconds()
For t=1 To 200000
With Societe("PureBasic")\Service("Commercial")\Employe("Reference"+Str(t))
\Prenom = "Pierre "+Str(t)
\Nom = "Dupond"
\Age = 28
EndWith
Next
Global Controle.s = "Prénom du commercial Reference9999 : "+Societe("PureBasic")\Service("Commercial")\Employe("Reference9999")\Prenom + Chr(10)
TimeFin = ElapsedMilliseconds()
MessageRequester("Temps d'exécution", Controle + Str( TimeFin - TimeDebut ) + " ms", #MB_OK)