Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Are you having fun yet?


devel / comp.lang.python / Re: Pypy with Cython

SubjectAuthor
* Re: Pypy with CythonAlbert-Jan Roskam
`* Re: Pypy with CythonGreg Ewing
 `- Re: Pypy with CythonOscar Benjamin

1
Re: Pypy with Cython

<mailman.5.1643904475.27178.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16880&group=comp.lang.python#16880

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: sjeik_ap...@hotmail.com (Albert-Jan Roskam)
Newsgroups: comp.lang.python
Subject: Re: Pypy with Cython
Date: Thu, 03 Feb 2022 17:07:45 +0100
Lines: 13
Message-ID: <mailman.5.1643904475.27178.python-list@python.org>
References: <CAGGBd_qUSFQb+4yRx_AGb1g7bxdpCrcZ1HMgrLyUMc-mXVW98g@mail.gmail.com>
<DB6PR01MB38959EE997444EC2B3536B4383289@DB6PR01MB3895.eurprd01.prod.exchangelabs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
X-Trace: news.uni-berlin.de 2XuvW4di4xym2Cx8204tEgk9wCPEs83BOBpf7Sw87cTw==
Return-Path: <sjeik_appie@hotmail.com>
X-Original-To: Python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=hotmail.com header.i=@hotmail.com header.b=DQLwMPLu;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2022': 0.05; 'modules':
0.07; 'received:eur05-am6-obe.outbound.protection.outlook.com':
0.07; 'cc:addr:python-list': 0.09; 'dan': 0.09;
'received:40.92.91': 0.09; '&gt;': 0.14; '====': 0.16;
'cc:name:python list': 0.16; 'pypy&quot;': 0.16; 'rewrite': 0.16;
'subject:Cython': 0.16; 'url:latest': 0.16; 'python': 0.16; 'feb':
0.17; 'probably': 0.17; 'cc:addr:python.org': 0.20; 'extension':
0.25; 'cc:2**0': 0.25; 'normally': 0.26; 'sense': 0.28;
'thinking': 0.28; 'but': 0.32; 'header:In-Reply-To:1': 0.34; 'url-
ip:104.17/16': 0.35; 'use': 0.39; 'best': 0.61; 'url:index': 0.68;
'one:': 0.84; 'received:eurprd01.prod.exchangelabs.com': 0.84
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=mkHtXr1WzHnDgAvnCydfkJUL9rO1rpASM7G6KDfq+QXDr+Y/hT/YtrYiUmgcCJtJCAiaa6EVmdSk4oJAgMDKb3C/WAfzF44s1WRJ8NcG0sRue1NE8X/8glPNHrGhOTkHjTJpwLw1O6YwFXwb4Ky+nX0RzcAhtH9VWQXzjF6Tk+ma+XXNtTiy9+K1j/GRHUYLz9d2/9xHQmrE23BI+woiUusjiUP58yi8tng3V+wNtqW/4d5YwIJmtymcldyquptJ5gkeYdbs+xp80AxOV4txJV8S7ekagGlm1qilJ2bVz/smb1jn134MnOyjf0w5Aehvd/fDfuO+HOwAagaQW6olFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=+ANiflOCJZEDs1sSEx21Fqy9iyOFqVmuKZoN0fyE0n4=;
b=VOijYx3e5K8+p6iUA1O7laVzgwDHx67RHcz5c9mjQrGtTVgEnghD2f7ikXyzgyc4nVw5sPfDXpNN3OOKArA/Gkmak2EYBvmiMMEliFFCALNeznAyPdpenQYCULRZEHDOvRo2bxDBPoENMTGDiK/4Vev/MSu32F3r9wN/J7qsu4zh6LaCKzBKkIwDhf/0DEZIqUrF7oZ5kuDU2zB2hXWPUJu4erVZfcnV/eIGocmelFWEbT97elnengLfPemWyB9USYccwzRE8SLnaKGQWMGPNAMAqUA9Ay5MVqj3Hc30MN1xffUkBCSyL8eLrQdFYX0rh6lwihEvCSfNn16lLJQHwg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=+ANiflOCJZEDs1sSEx21Fqy9iyOFqVmuKZoN0fyE0n4=;
b=DQLwMPLucLDAQGQtoJJbUZ/uJ5pC3dflCAaswGQKvQcUnH7m4IlA17+6ALu0F/PYoVbe59dCCm8jM13RQ8ynWO/S6dZFErh+cA87RKfDqhzyRL+L3/QIi9hxDvEdxpmwd31sHN58RTSvFjVGjTVXSVEq1zWmNJL2EdjcySvCjDhtLGKmwPabEdw4o09sAcVrF5H3iZ/SiONNa5sush5Urd6JxTDar2CScyZMOGSMw5sX+AOKpcAFdM26OYlv9ncFX6nq+OpWhAd50BbtSWBSEvVqOdwklGgqUd8MsXtxV7/0q0i4lwYDN/47eEP4ChUe1SgKLzR1kVzsAQS0MjN5Rg==
X-Android-Message-ID: <5203ec33-5ab4-4a28-9db6-d6fe59a8563d@email.android.com>
In-Reply-To: <CAGGBd_qUSFQb+4yRx_AGb1g7bxdpCrcZ1HMgrLyUMc-mXVW98g@mail.gmail.com>
X-TMN: [bDQB2S/M6jgLVKHHGGbNholFetEkN4KS]
X-ClientProxiedBy: AM3PR07CA0084.eurprd07.prod.outlook.com
(2603:10a6:207:6::18) To DB6PR01MB3895.eurprd01.prod.exchangelabs.com
(2603:10a6:6:4b::10)
X-Microsoft-Original-Message-ID: <5203ec33-5ab4-4a28-9db6-d6fe59a8563d@email.android.com>
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 4bccaea9-7027-46a5-6d2e-08d9e72f52f6
X-MS-TrafficTypeDiagnostic: PA4PR01MB7248:EE_
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: wRJIvlB2ot1Fz1JfFHfIKZ4x/DAWcunQK96H9/o2xPGhEVhxsQXTWv9TWMZdk5DmX93vo9VEccD67Zzfz/6AKtpMkRbX+oxiEwYosKCKz6XFps3Ln1QIIg6y+TbTPeM4lcs5ExQjgPEW7cOS6QzDzWJ7X/qK9UyAiyNedPgj0T60omVrhN8j5vM6ORoWT4eY/gKNlFPCOxokfvvu59mCCSDSp/mXktlz0VIEiAZQD5ImOedcOXrxGGySUMIrvnmggRJhZ3LjV5mzxWqaUlG/VBXt9t4xYMGwHK33sHWvTZOQgJZeMRylf/4shXpcDSZPzS5rXlFQPN6E+gRkJVPMn80Y7IBjB71wN5iftEmUJETb939RVGefSsrbsvqEc4XyWnP9S/ifGRjJq7u4n5JQSHFQcrdBmMyXMqnZc091ELY5nguxsKMft/dzZXRcqJvXAk79Cj7zn19Fe9JWLEqutLfVVIxjUPqr7wC9MiJf1R6aPVdl1nW7af+1I0tbYSDsVgr7vvL3jGIbQkTYpU4zx8yf36YnVNLfOCG8lXnY7hgZ6ZqtIg7tH+MZBeESHypORQviPHJ16WMqCD90sElvRQ==
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: iBdXbiwsgdw4w4V2ZGpJKE/cAbIbqb66ld3Alc+9VPPq0
eekmT0ditBvDkOpfJx94ppIjsnPS2kIS+1y9an4JcN3ii
EPrw8dCok6s1BhoMuAdzRTSmqWV4IcKrVDOFolARMH7oj
2fiyJ5NrgVF2T7Oy7z0MBnGPawNCjnlmkvP+VV5KuB9Oz
mUy1zxDdLBpTFvtwP+aAr2j563wEHUqcatvkE6TNqA0cA
/mFcWqwSaWYEJOkXZkfR/N4wyB+19vtOihqiAvYFsyGDu
Wt381q59XhkSm0fNfxdGFT8BHHC+QKZw1qZQ4RRzYxyuE
Uy7O0+n6ncvPeFQfOzMq/aXAeao0C68gXXZzD6420Tl3H
QSkIN4gcAFgvuqDTJRSyqE+YRrMgRSQtaSP2bH2rWw2ch
v6qC900Rbq0niiobYpG6JqBEluTHBo3+kb1+owBLsLhh0
/bmn6U73k1wqyyX0bDzSIuRKwFsbSzMdBlxka6GItnFkj
42RrHghRgFLyx8PRUR7v74yOjRyMWAODy/twcNhv20q6h
S493MqsuiEiFb9hPiuxMY4d40gzANUmRYGcX+WTYOm1wP
EHwUZhB4wgHsA8Ihsy1amlvomsZYCklY1EvQFNW0BTLHA
CDW56MtZQmgjKltCC7CRhOrW0+jOBgKRM/ZSpxMTnf95u
enkhVBgljUGEIHJx9XAMUr8IqV+dh1weZcZBbnQ+eGdEY
Y0LXwA/HT8H+VeLUPc351iT7Mll0qFDoOBrU6CGu6MCg4
HT0YCQB65OAgSWrwVFXvAqcH2xL64/ASG+xJta0i2DiQJ
lWzvEytyv/FAFS6+LTZEY+H9ehgwpZIfwgfUCQ0pxv4P7
ljztcahVJUN8mbki9h2633Uqdb+gayvkFwm8EuY/N7QCL
JLTrpWnjJYOgtSafdgmCrMMDdUOQigHRCTMEaz0LSgljv
3rVbmk95ah5WpaKguTnWffO1NjXAADG10NkFw==
X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-fc60a.templateTenant
X-MS-Exchange-CrossTenant-Network-Message-Id: 4bccaea9-7027-46a5-6d2e-08d9e72f52f6
X-MS-Exchange-CrossTenant-AuthSource: DB6PR01MB3895.eurprd01.prod.exchangelabs.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2022 16:07:49.4433 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR01MB7248
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <DB6PR01MB38959EE997444EC2B3536B4383289@DB6PR01MB3895.eurprd01.prod.exchangelabs.com>
 by: Albert-Jan Roskam - Thu, 3 Feb 2022 16:07 UTC

On Feb 3, 2022 17:01, Dan Stromberg <drsalists@gmail.com> wrote:

> The best answer to "is this slower on

> Pypy" is probably to measure.
> Sometimes it makes sense to rewrite C

> extension modules in pure python for pypy.

====
Hi Dan, thanks. What profiler do you recommend I normally use cProfile,
but I was thinking about this
one: https://pyinstrument.readthedocs.io/en/latest/index.html

Re: Pypy with Cython

<j635b5Fl6vdU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16891&group=comp.lang.python#16891

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: greg.ew...@canterbury.ac.nz (Greg Ewing)
Newsgroups: comp.lang.python
Subject: Re: Pypy with Cython
Date: Fri, 4 Feb 2022 12:04:02 +1300
Lines: 12
Message-ID: <j635b5Fl6vdU1@mid.individual.net>
References: <CAGGBd_qUSFQb+4yRx_AGb1g7bxdpCrcZ1HMgrLyUMc-mXVW98g@mail.gmail.com>
<DB6PR01MB38959EE997444EC2B3536B4383289@DB6PR01MB3895.eurprd01.prod.exchangelabs.com>
<mailman.5.1643904475.27178.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 6fqS4ZXUcQIvXE83AMLBBQ4RJxy6A09lOvYp+SPsA6R97cV3ff
Cancel-Lock: sha1:uX+xYMp+aSTz65Y8clSDOxD+mR4=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:91.0)
Gecko/20100101 Thunderbird/91.3.2
Content-Language: en-US
In-Reply-To: <mailman.5.1643904475.27178.python-list@python.org>
 by: Greg Ewing - Thu, 3 Feb 2022 23:04 UTC

On 4/02/22 5:07 am, Albert-Jan Roskam wrote:
> On Feb 3, 2022 17:01, Dan Stromberg <drsalists@gmail.com> wrote:
>
> What profiler do you recommend

If it runs for that long, just measuring execution time should
be enough. Python comes with a "timeit" module to help with
that, or you can use whatever your OS provides (e.g. the
"time" shell command in unices).

--
Greg

Re: Pypy with Cython

<mailman.0.1643955788.7010.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16892&group=comp.lang.python#16892

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: oscar.j....@gmail.com (Oscar Benjamin)
Newsgroups: comp.lang.python
Subject: Re: Pypy with Cython
Date: Fri, 4 Feb 2022 00:35:05 +0000
Lines: 43
Message-ID: <mailman.0.1643955788.7010.python-list@python.org>
References: <CAGGBd_qUSFQb+4yRx_AGb1g7bxdpCrcZ1HMgrLyUMc-mXVW98g@mail.gmail.com>
<DB6PR01MB38959EE997444EC2B3536B4383289@DB6PR01MB3895.eurprd01.prod.exchangelabs.com>
<mailman.5.1643904475.27178.python-list@python.org>
<j635b5Fl6vdU1@mid.individual.net>
<CAHVvXxRDAwXDv_G_aRqAuYKmaDi_SQZ2_YWvY2e8BN4iKTfvBw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de apMF2atX5b6s9FxYSnU+Sws9rYqaaKc7xuEsBBARbtGQ==
Return-Path: <oscar.j.benjamin@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=Vt+O/iTr;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(which': 0.04; '(e.g.':
0.05; '2022': 0.05; 'run.': 0.05; 'e.g.': 0.07; 'loop': 0.07;
'approaches': 0.09; 'dan': 0.09; 'enough.': 0.09; 'etc).': 0.09;
'overhead': 0.09; 'timing': 0.09; '*think*': 0.16; 'benchmarking':
0.16; 'greg': 0.16; 'proportion': 0.16; 'received:209.85.218':
0.16; 'subject:Cython': 0.16; 'wrote:': 0.16; 'python': 0.16;
'code.': 0.17; 'feb': 0.17; 'instead': 0.17; 'thu,': 0.19;
'to:addr:python-list': 0.20; 'i.e.': 0.22; 'maybe': 0.22; 'code':
0.23; 'command': 0.23; 'run': 0.23; 'normally': 0.26; 'function':
0.27; 'purpose': 0.28; 'takes': 0.31; 'am,': 0.31; 'module': 0.31;
'program': 0.31; 'execution': 0.32; 'message-id:@mail.gmail.com':
0.32; 'but': 0.32; 'particular': 0.33; 'same': 0.34; 'header:In-
Reply-To:1': 0.34; 'received:google.com': 0.34; 'running': 0.34;
'runs': 0.35; 'yes,': 0.35; 'final': 0.35; 'from:addr:gmail.com':
0.35; 'functions': 0.36; 'change': 0.36; "it's": 0.37;
'received:209.85': 0.37; 'this.': 0.37; 'way': 0.38; 'could':
0.38; 'received:209': 0.39; 'changes': 0.39; 'added': 0.39;
'single': 0.39; 'otherwise': 0.39; 'considering': 0.39; 'use':
0.39; 'program.': 0.40; 'want': 0.40; 'try': 0.40; 'should': 0.40;
'helps': 0.60; 'between': 0.63; 'identify': 0.64; 'improved':
0.64; 'your': 0.64; 'parts': 0.65; 'less': 0.65; 'that,': 0.67;
'times': 0.69; 'compared': 0.71; 'speed': 0.71; 'accurate': 0.74;
'reliable': 0.74; 'spent': 0.81; 'exactly.': 0.84; 'itself.':
0.84; 'measuring': 0.84; 'oscar': 0.84; 'assess': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=QAzPWL2x430IL2pPiSIuIXqNe0xukCpJiV9IvAbyGAY=;
b=Vt+O/iTru+kqPwxZWYm6v6HWpDzYQLFYs4AQtgZEas1PzH4uUq1eA++6odhteqgbU7
siVFtKLZiXN6EY68tB6Lsn5XD1H5eoaqgd9rGofPaJY01t6guLxjorz4P6LB+K9qjJcz
0dD5tcfhJmFRc+cMtBJRYMXJG8cRxSeBxwqT6DKrSepVME+chLonZdWCePJqMP24hfNU
OL/XgzYS6748+Se8VfOgeN/z56j2FrGTpbtgTJpEKF1taIEI5TSs8j1mE2LGVP7kg2eY
GRZIHwHCYUrpPoXa3Azlryo1gCwbAgDTd7hhkzpfzGT6fI7Pv1Zyg8OV0TBIt0aSjejM
ksHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=QAzPWL2x430IL2pPiSIuIXqNe0xukCpJiV9IvAbyGAY=;
b=KxMGqsNrgOcRE4U402wpStYwNdPYli3L2YquAByxdWbxwzuuknLQtVPzPvyQ0zfr47
Plcuxb+5Pg2TQTD7cayxa3zEmJaAuJmuV7v4cSJYAA9W8/6u2vF4oPxyrpuviJMoUCOw
qBpxPcs2qHo6P9I3Lm41g38KUzT2051MaD8lc7ma+/wCJkc/Hd3iqbyT0TRrj/kHu1mC
Kn4nksyLpSNmm/I0mPpACEcBCZPQLT9Pw4UORfQEOb2GNSiyilxfc1sAte3/rjTsSt9D
gUe3bHazgwPK+mCkDboiFEoNmLy9HZgP0uh2skxmxDUGq0nQQuAfAUAVDMEdhXYncuy1
357g==
X-Gm-Message-State: AOAM531fYzd1CNqaEskLtBdX/EiN9jqWtCnKIpwExPxjXnwpqb6CASS0
zk98PSnGsSrN5tWQHSB1tAOjgE+3dIk2t3ClFOcuLYHdiH8=
X-Google-Smtp-Source: ABdhPJz2FvWuMHD9gLsjF+lXk/lByrCN0XcqRbGrGjOROb4YI5BmycLJzXOOz7Ctv5s3/U2oPVT8+By/NJreorTYcZ4=
X-Received: by 2002:a17:907:3fa8:: with SMTP id
hr40mr363933ejc.596.1643934916608;
Thu, 03 Feb 2022 16:35:16 -0800 (PST)
In-Reply-To: <j635b5Fl6vdU1@mid.individual.net>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAHVvXxRDAwXDv_G_aRqAuYKmaDi_SQZ2_YWvY2e8BN4iKTfvBw@mail.gmail.com>
X-Mailman-Original-References: <CAGGBd_qUSFQb+4yRx_AGb1g7bxdpCrcZ1HMgrLyUMc-mXVW98g@mail.gmail.com>
<DB6PR01MB38959EE997444EC2B3536B4383289@DB6PR01MB3895.eurprd01.prod.exchangelabs.com>
<mailman.5.1643904475.27178.python-list@python.org>
<j635b5Fl6vdU1@mid.individual.net>
 by: Oscar Benjamin - Fri, 4 Feb 2022 00:35 UTC

On Thu, 3 Feb 2022 at 23:16, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
>
> On 4/02/22 5:07 am, Albert-Jan Roskam wrote:
> > On Feb 3, 2022 17:01, Dan Stromberg <drsalists@gmail.com> wrote:
> >
> > What profiler do you recommend
>
> If it runs for that long, just measuring execution time should
> be enough. Python comes with a "timeit" module to help with
> that, or you can use whatever your OS provides (e.g. the
> "time" shell command in unices).

Yes, exactly. It's important to distinguish between timing or
benchmarking as compared to profiling.

When you use a profiler it does not usually give an accurate
representation of the time taken by the same code when the profiler is
not running because of the overhead added by the profiler itself. The
purpose of the profiler is instead to give lots of information that
can help you to *think* about how to make the code faster (e.g. what
proportion of time is spent in different functions or how many times
is a function called etc). This information is useful for considering
at a *high level* what parts of the code could be improved to make it
faster by e.g. calling a particular function less or making that
function faster.

The timeit module can be used to time micro-operations i.e. things
that take nanoseconds or maybe milliseconds. It repeats an operation
in a loop which is often needed to get reliable timings for things
that are otherwise too fast to reliably time from a single run. It can
give information that helps to identify good approaches to try at a
*low level* e.g. when optimising a single line of code.

If you want to *evaluate* whether or not a change actually makes your
*whole* program faster you should just run your code normally but time
how long it takes (which is what the unix "time" command does). You
can also use time.time() from Python for this. Profilers and timeit
help to identify ways to speed up your code but should not be used as
the way to assess the final impact of the changes you make to a long
running program.

--
Oscar

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor