Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2015 21:11:57 +0100
From:      Roland Smith <rsmith@xs4all.nl>
To:        Vladimir Bogrecov <bogrecov@gmail.com>
Cc:        python@freebsd.org
Subject:   Re: Python on FreeBSD is slower than on Linux
Message-ID:  <20151119201157.GA68473@slackbox.erewhon.home>
In-Reply-To: <CANx%2B6QKT00ZC4Gh3UHp7qW6mtKJHLn_NkMD1gegTYgiu=gByXg@mail.gmail.com>
References:  <CANx%2B6QKT00ZC4Gh3UHp7qW6mtKJHLn_NkMD1gegTYgiu=gByXg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 12, 2015 at 10:26:22PM +0300, Vladimir Bogrecov wrote:
> Hello,
>=20
> 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
>=20
> import random
> import time
>=20
>=20
> def test_sort(size):
>     sequence =3D [i for i in range(0, size)]
>     random.shuffle(sequence)
>     start =3D time.time()
>     ordered_sequence =3D sorted(sequence)
>     print(time.time() - start)
>=20
>=20
> if __name__ =3D=3D '__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
--=20
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)

--zhXaljGHf11kAtnf
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAABCAAGBQJWTi0EAAoJEED21dyjijPgCrEP/RrGL2zekUquefcQaroN0hpx
8QfswlO9b+8HCT2sfZ4CGAOwzDEI8KWySvq80CaWAWeU1RAoLPBhX/HjX8LwIes6
0sy5QH9zY3iFt1bWOO2VOO9yx5Cqq1qP7OE7aBfM4Z202854KEWzCxFnhBZWzMxc
BWsyLbEh9efgqK7ItN6o0A/o1764yhRWChwQ0DOfXOQtHI5y5FowrPzWXFRxi01c
SK1hS2M3uW0OnYhj5a4wqS7QpNYXcnEPE20z1Z4s9778tbFJyrpVGxdMqseONjB+
jRdNCY+Nc4dfo5w+BIiz9EliCBfvh+rfInfjmkWGMVizIjWERoSG021jQHvkhWNC
1ztcnEbJWW8jNPCDD6R3swxiYyF9bZc7m4Bz4okBFFkQe6BZqNTfrpDA4s6JLu87
8ucv2jGtXa/4AC3LrUrIs2yOMon5vShqxGtrX5FO4VnXjv1uxpoEqG4Ad+M3w+YJ
pGKXWD6JQk47EI8p+TTQ6rCNo7d3GJ9Ht3/4aLhP2S3E5qMM2o7kw4wJh5Gi81Q/
sUJ+6xkL74hWGGWP25F5JS08lun8fGlCmhEX4BDp+gBheKeBqy+cGraqmCzi1p4u
PRk5gzTU3lYulXHJaJbHS1sOMftrktFZ79c39c/2jsfKZcToVKPLzG5ghpgIjnXu
5yfAHrx+koByvgVOAMO7
=spfo
-----END PGP SIGNATURE-----

--zhXaljGHf11kAtnf--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151119201157.GA68473>