On Thu, Nov 12, 2015 at 10:26:22PM +0300, Vladimir Bogrecov wrote: > Hello, > > I'm developing a little project on Python 3.5. The server's operating > system is FreeBSD 10.2. Today I decided to do a little test "just for fun" > and the result has confused me. I ran the following code > > import random > import time > > > def test_sort(size): > sequence = [i for i in range(0, size)] > random.shuffle(sequence) > start = time.time() > ordered_sequence = sorted(sequence) > print(time.time() - start) > > > if __name__ == '__main__': > test_sort(1000000)
On my FreeBSD 10.2 STABLE AMD64 system (Intel Core2 quad Q9300 2.5 GHz, 4 GB RAM) the code prints 1.17 seconds for Python 3.5.0 and 1.21 seconds for Python 2.7.10. Roland -- R.F.Smith http://rsmith.home.xs4all.nl/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)
signature.asc
Description: PGP signature