a �crit dans le message : 8ckscp$nv7$1@nnrp1.deja.com... > In article <38ECB0CC.3B2941E2@earthlink.net>, > Charles Hixson wrote: Ok, now I see the problem. You did not code the same algorithm :) Look at markMultiplum in Java you have added a first test isPrime[i] and this is not coded in Ada, most certainly this would reduce Ada time :) > // This better get inlined !! > // (Oh, well, the compiler won't read this, will it ? :-) > private static void markMultiplum(int divisor, boolean[] isPrime) { > for (int i = divisor+1; i < isPrime.length; i++) { > if (isPrime[i] && i % divisor == 0) isPrime[i] = false; > } > procedure MarkMultiplum (Divisor : in Integer; > Is_Prime : in out BoolArray) is > begin > for i in Divisor+1 .. Is_Prime'Last loop > if i mod Divisor = 0 then Is_Prime (i) := false; end if; > end loop; > end MarkMultiplum; Do you mind to try with for i in Divisor+1 .. Is_Prime'Last loop if Is_Prime (i) and then i mod Divisor = 0 then Is_Prime (i) := false; end if; end loop; And anyway this algorithm is very far from being efficient... Pascal. -- --|------------------------------------------------------------ --| Pascal Obry Team-Ada Member | --| | --| EDF-DER-IPN-SID- T T I | --| Intranet: http://cln46gb | --| Bureau N-023 e-mail: p.obry@der.edf.fr | --| 1 Av G�n�ral de Gaulle voice : +33-1-47.65.50.91 | --| 92141 Clamart CEDEX fax : +33-1-47.65.50.07 | --| FRANCE | --|------------------------------------------------------------ --| --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination"