Python on FreeBSD is slower than on Linux
Roland Smith
rsmith at xs4all.nl
Thu Nov 19 20:13:13 UTC 2015
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-python/attachments/20151119/dd24a7c6/attachment.bin>
More information about the freebsd-python
mailing list