From owner-freebsd-python@freebsd.org Thu Nov 12 19:26:23 2015 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F39FA2DC7C for ; Thu, 12 Nov 2015 19:26:23 +0000 (UTC) (envelope-from bogrecov@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 315A21C5A for ; Thu, 12 Nov 2015 19:26:23 +0000 (UTC) (envelope-from bogrecov@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 2DDE9A2DC7B; Thu, 12 Nov 2015 19:26:23 +0000 (UTC) Delivered-To: python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13B26A2DC7A for ; Thu, 12 Nov 2015 19:26:23 +0000 (UTC) (envelope-from bogrecov@gmail.com) Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD7B71C59 for ; Thu, 12 Nov 2015 19:26:22 +0000 (UTC) (envelope-from bogrecov@gmail.com) Received: by obbnk6 with SMTP id nk6so54682668obb.2 for ; Thu, 12 Nov 2015 11:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=q7l2tkaNInc25smcUUqJwHd/gu2jf2bRgUy9mKPog1Y=; b=lqjQ6+YDEw7K8Ej02Hq7aZ1Lwanj3+eNtTfobh20M7PeNuuMSZYS50mldyaEKTdiGf fmKz746NUp6jQycInBSvRLkNJmd2000X1Ej6K07X7Os4lpsw4a4qvkSo3HmFs3dJhMoi YAfOaiU2MBiUN6q73K5W+LC1HkSJ6Lxv6jG93r5aAZWT4OHsHDQW0IooTgGkTHoL7YN0 p999+2Qo2CQEV90mV5N8Y8meBRmEtC65ByHBuKI8FFmjqfhg7Y1FS+9wJZ0+5KDrJ0SE 306UtlrQgZR1CmXW7NWMS+On6Y39rdr93TnrC3OcEPTYPhdPnkhFecJNOFyf/eICSf3p 49yQ== MIME-Version: 1.0 X-Received: by 10.60.57.100 with SMTP id h4mr9879701oeq.71.1447356382051; Thu, 12 Nov 2015 11:26:22 -0800 (PST) Received: by 10.182.212.66 with HTTP; Thu, 12 Nov 2015 11:26:22 -0800 (PST) Date: Thu, 12 Nov 2015 22:26:22 +0300 Message-ID: Subject: Python on FreeBSD is slower than on Linux From: Vladimir Bogrecov To: python@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 19:26:23 -0000 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 FreeBSD 10.2 x64 and on Debian 8 x64. Both computers was the smallest (5$ per month) virtual machines on the Digital Ocean ( https://www.digitalocean.com). The average result on the FreeBSD was 1.5 sec, on the Debian 1.0 sec. Both machines was created specially for test and had not any customization. Could you help me to understand why python is so slower on FreeBSD and may be there are some steps I can perform to speed up the python to work not slower than on Debian. I have found in Google the similar question: https://lists.freebsd.org/pipermail/freebsd-python/2012-June/004306.html so it has an interest not only for me. P.S. I really like FreeBSD and I would be happy to solve this issue. If you will have an interest to this issue I can provide SSH access for both machines :) Thank You!