Enrico Franchi wrote:
Sulla mia macchina:
% time python -c "import km;km.sieve(100000000)"
python -c "import km;km.sieve(100000000)"  9.10s user 0.21s system 97%
cpu 9.580 total

Adesso vedo se riesco ad aggiungerci una qualche micro-ottimizzazione
(al mio).

% time python erat_matrix.py 100000000
(array([       2,        3,        5, ..., 99999959, 99999971, 99999989]),)
python erat_matrix.py 100000000  6.07s user 0.85s system 99% cpu 6.958 total

Uff. Pero' ora sono 15 righe.


--
.
..: -enrico-

_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a