Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #105: UPS interrupted the server's power


comp / comp.lang.tcl / Re: tcl versa python regarding performance

SubjectAuthor
* tcl versa python regarding performanceaotto1968
+* Re: tcl versa python regarding performanceundroidwish
|+* Re: tcl versa python regarding performanceaotto1968
||`* Re: tcl versa python regarding performanceaotto1968
|| `* Re: tcl versa python regarding performanceGerald Lester
||  `- Re: tcl versa python regarding performanceaotto1968
|`* Re: tcl versa python regarding performanceAlan Grunwald
| `- Re: tcl versa python regarding performanceGerald Lester
+* Re: tcl versa python regarding performanceaotto1968
|+* Re: tcl versa python regarding performanceaotto1968
||`* Re: tcl versa python regarding performanceaotto1968
|| +- Re: tcl versa python regarding performanceaotto1968
|| `* Re: tcl versa python regarding performancesaito
||  `* Re: tcl versa python regarding performanceaotto1968
||   `* Re: tcl versa python regarding performancesaito
||    `* Re: tcl versa python regarding performanceaotto1968
||     `* Re: tcl versa python regarding performanceundroidwish
||      `* Re: tcl versa python regarding performanceaotto1968
||       `- Re: tcl versa python regarding performanceundroidwish
|`* Re: tcl versa python regarding performanceaotto1968
| `* Re: tcl versa python regarding performanceChristian Gollwitzer
|  +- Re: tcl versa python regarding performanceundroidwish
|  `- Re: tcl versa python regarding performanceaotto1968
+- Re: tcl versa python regarding performanceaotto1968
+* Re: tcl versa python regarding performanceaotto1968
|`* Re: tcl versa python regarding performanceet99
| `- Re: tcl versa python regarding performanceaotto1968
+- Re: tcl versa python regarding performanceaotto1968
+- Re: tcl versa python regarding performanceaotto1968
+- update ...aotto1968
+* Nice example about the "inefficiently" of the tcl "c" api.aotto1968
|`* Re: Nice example about the "inefficiently" of the tcl "c" api.undroidwish
| `* Re: Nice example about the "inefficiently" of the tcl "c" api.Gerald Lester
|  +* Re: Nice example about the "inefficiently" of the tcl "c" api.Christian Gollwitzer
|  |`* Re: Nice example about the "inefficiently" of the tcl "c" api.aotto1968
|  | `* Re: Nice example about the "inefficiently" of the tcl "c" api.undroidwish
|  |  `* Re: Nice example about the "inefficiently" of the tcl "c" api.aotto1968
|  |   `* Re: Nice example about the "inefficiently" of the tcl "c" api.undroidwish
|  |    `* Re: Nice example about the "inefficiently" of the tcl "c" api.aotto1968
|  |     `- Re: Nice example about the "inefficiently" of the tcl "c" api.undroidwish
|  `- Re: Nice example about the "inefficiently" of the tcl "c" api.aotto1968
+- build a perfserver distributionaotto1968
`* Re: tcl versa python regarding performanceaotto1968
 `- Re: tcl versa python regarding performanceaotto1968

Pages:12
Subject: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 13 Aug 2024 20:40 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: tcl versa python regarding performance
Date: Tue, 13 Aug 2024 22:40:04 +0200
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <v9ggb7$2dcu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 13 Aug 2024 22:40:08 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="fc70260d1ac18cb862f51c0046dd68f9";
logging-data="79262"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zIyp3rFEfz4hR8FAG+WT+toeqb1PHatM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EObOSjc+hCY1yEVdmrXSdihV7as=
Content-Language: en-US
View all headers

Hi, some (unproven) statistics from my SW regarding the performance TCL versa PYTHON

The --send ... send packages
The --parent/child ... measure startup time
The other ... build data structures

Tcl is except --parent (startup) slower than python → I think the CORE problem is the OO implementation in TCL

→ the basic technology for TCL and PYTHON is a OO wrapper around the C-library this mean the BASIC workload
for TCL & PYTHON is the same and the TIME difference is just the TCL/PYTHON overload

TCL
===

setup=release
> feature=tcl_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --all @ $TCLSH
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-tcl.tcl
:PerfClientExec }: start ------------------------ : result [ count / sec ]
:statistics }: --send : 216004.5 [ 432206 / 2.000912 ]
:statistics }: --send-string : 224700.4 [ 449614 / 2.000949 ]
:statistics }: --send-and-callback : 121014.5 [ 242218 / 2.001561 ]
:statistics }: --send-and-wait : 58694.0 [ 117389 / 2.000015 ]
:statistics }: --send-persistent : 13358.7 [ 26718 / 2.000046 ]
:statistics }: --parent : 82.5 [ 165 / 2.000311 ]
:statistics }: --child : 21321.3 [ 42643 / 2.000022 ]
:statistics }: --bus : 40133.7 [ 80268 / 2.000017 ]
:statistics }: --bfl : 41333.4 [ 82667 / 2.000005 ]
:statistics }: --bin : 264818.7 [ 529687 / 2.000187 ]
:statistics }: --str : 265383.5 [ 530867 / 2.000377 ]
:PerfClientExec }: end: ----------------------------------------

PYTHON
======

setup=release
> feature=py_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --all @ $PYTHON
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-py.py
:PerfClientExec }: start ------------------------ : result [ count / sec ]
:statistics }: --send : 292415.7 [ 584872 / 2.000139 ]
:statistics }: --send-string : 294627.4 [ 589494 / 2.000812 ]
:statistics }: --send-and-callback : 154291.6 [ 308617 / 2.000219 ]
:statistics }: --send-and-wait : 73577.8 [ 147156 / 2.000005 ]
:statistics }: --send-persistent : 13796.6 [ 27594 / 2.000058 ]
:statistics }: --parent : 71.0 [ 142 / 2.000464 ]
:statistics }: --child : 21959.2 [ 43919 / 2.000024 ]
:statistics }: --bus : 67991.3 [ 135983 / 2.000005 ]
:statistics }: --bfl : 65537.4 [ 131075 / 2.000004 ]
:statistics }: --bin : 326737.6 [ 653632 / 2.000480 ]
:statistics }: --str : 327746.7 [ 655625 / 2.000402 ]
:PerfClientExec }: end: ----------------------------------------

This is the reference in C only
===============================

setup=release
> feature=c_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --all @
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-c
:PerfClientExec }: start ------------------------ : result [ count / sec ]
:statistics }: --send : 372049.5 [ 744214 / 2.000309 ]
:statistics }: --send-string : 388248.2 [ 776648 / 2.000390 ]
:statistics }: --send-and-callback : 221224.1 [ 442541 / 2.000420 ]
:statistics }: --send-and-wait : 87320.3 [ 174641 / 2.000004 ]
:statistics }: --send-persistent : 15245.3 [ 30491 / 2.000024 ]
:statistics }: --parent : 552.4 [ 1105 / 2.000235 ]
:statistics }: --child : 35888.9 [ 71778 / 2.000004 ]
:statistics }: --bus : 80124.6 [ 160250 / 2.000011 ]
:statistics }: --bfl : 86655.9 [ 173312 / 2.000003 ]
:statistics }: --bin : 400718.2 [ 801590 / 2.000383 ]
:statistics }: --str : 396122.8 [ 792369 / 2.000312 ]
:PerfClientExec }: end: ----------------------------------------

Subject: Re: tcl versa python regarding performance
From: undroidwish
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 13 Aug 2024 20:51 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: undroidwish@googlemail.com (undroidwish)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Tue, 13 Aug 2024 22:51:19 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <v9gh08$2gpu$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 13 Aug 2024 22:51:20 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7806caa05eb974f18da8eb78cc158888";
logging-data="82750"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rMqVYKP+fBzLF6JxR2lEb2xdrMN0DDI8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:Cmwx0JG/8XbRomwWzGyzdqSbvfI=
Content-Language: en-US
In-Reply-To: <v9ggb7$2dcu$1@dont-email.me>
View all headers

On 8/13/24 22:40, aotto1968 wrote:

> Hi, some (unproven) statistics from my SW regarding the performance TCL
^^^^^^^^

Exactly. I tend to go even further and add the attribute useless to
unproven as long as you publish some numbers with some subjective
analysis without presenting the implementation and the measurement
method.

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 14 Aug 2024 09:02 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Wed, 14 Aug 2024 11:02:53 +0200
Organization: A noiseless patient Spider
Lines: 65
Message-ID: <v9hrrt$crh9$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9gh08$2gpu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 14 Aug 2024 11:02:53 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8932f3de39092e60b21061a390a5b5d9";
logging-data="421417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PbsECoA8gKK8SRJIP0x+04DrZYLOB1Ew="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6k5SdJyE7YIHexpKrKXoKZFYxcg=
In-Reply-To: <v9gh08$2gpu$1@dont-email.me>
Content-Language: en-US
View all headers

On 13.08.24 22:51, undroidwish wrote:
> On 8/13/24 22:40, aotto1968 wrote:
>
>> Hi, some (unproven) statistics from my SW regarding the performance TCL
>             ^^^^^^^^
>
> Exactly. I tend to go even further and add the attribute useless to
> unproven as long as you publish some numbers with some subjective
> analysis without presenting the implementation and the measurement
> method.

not really, with "aggressive" optimization the TCL is doing better, but not close to PYTHON

setup=release
> feature=cc_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-cc
: start ------------------------ : result [ count / sec ]
: --send : 387331.8 [ 774702 / 2.000099 ]
: end: ----------------------------------------
> feature=c_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-c
: start ------------------------ : result [ count / sec ]
: --send : 390295.8 [ 780623 / 2.000081 ]
: end: ----------------------------------------
> feature=py_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @ $PYTHON
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-py.py
: start ------------------------ : result [ count / sec ]
: --send : 284371.7 [ 568775 / 2.000111 ]
: end: ----------------------------------------
> feature=tcl_pipe
> .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @ $TCLSH
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-tcl.tcl
: start ------------------------ : result [ count / sec ]
: --send : 215990.2 [ 432027 / 2.000216 ]
: end: ----------------------------------------

setup=aggressive
> feature=cc_pipe
> .../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @
..../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfserver-cc
: start ------------------------ : result [ count / sec ]
: --send : 398688.2 [ 797433 / 2.000142 ]
: end: ----------------------------------------
> feature=c_pipe
> .../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @
..../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfserver-c
: start ------------------------ : result [ count / sec ]
: --send : 401113.0 [ 802377 / 2.000376 ]
: end: ----------------------------------------
> feature=py_pipe
> .../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @ $PYTHON
..../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfserver-py.py
: start ------------------------ : result [ count / sec ]
: --send : 286609.9 [ 573378 / 2.000552 ]
: end: ----------------------------------------
> feature=tcl_pipe
> .../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2 --send @ $TCLSH
..../aggressive/inst/sbin/x86_64-suse-linux-gnu-perfserver-tcl.tcl
: start ------------------------ : result [ count / sec ]
: --send : 237457.9 [ 475001 / 2.000359 ]
: end: ----------------------------------------

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 14 Aug 2024 09:16 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Wed, 14 Aug 2024 11:16:03 +0200
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <v9hskj$crh9$2@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9gh08$2gpu$1@dont-email.me>
<v9hrrt$crh9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 14 Aug 2024 11:16:04 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8932f3de39092e60b21061a390a5b5d9";
logging-data="421417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/vvUk0aCxwoBp/BX+R7I/KFYkcA1tlds="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GerRP/34wuAw+BqMMS2ktgHoW68=
In-Reply-To: <v9hrrt$crh9$1@dont-email.me>
Content-Language: en-US
View all headers

the first analyses is quite simple:

right now python does NOT support threads in NHI1 (will change soon) and tcl does…
this has an influence on the "release" build because this is NHI1 without threads in python and with
threads in tcl.

→ the difference is that the thread-local-storage is an STATIC REFERENCE in python and a POINTER in tcl.

→ the "aggressive" build does NOT use threads at all and the change between python and tcl is more compare-able
but is still ~20%

Subject: Re: tcl versa python regarding performance
From: Gerald Lester
Newsgroups: comp.lang.tcl
Organization: fastusenet - www.fastusenet.org
Date: Wed, 14 Aug 2024 12:04 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.szaf.org!3.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: tcl versa python regarding performance
Newsgroups: comp.lang.tcl
References: <v9ggb7$2dcu$1@dont-email.me> <v9gh08$2gpu$1@dont-email.me>
<v9hrrt$crh9$1@dont-email.me> <v9hskj$crh9$2@dont-email.me>
Content-Language: en-US
From: Gerald.Lester@gmail.com (Gerald Lester)
In-Reply-To: <v9hskj$crh9$2@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 20
Message-ID: <t31vO.417523$qO%5.288038@fx16.iad>
X-Complaints-To: abuse@fastusenet.org
NNTP-Posting-Date: Wed, 14 Aug 2024 12:04:41 UTC
Organization: fastusenet - www.fastusenet.org
Date: Wed, 14 Aug 2024 07:04:41 -0500
X-Received-Bytes: 1601
View all headers

On 8/14/24 04:16, aotto1968 wrote:
> the first analyses is quite simple:
>
> right now python does NOT support threads in NHI1 (will change soon) and
> tcl does…
> this has an influence on the "release" build because this is NHI1
> without threads in python and with
> threads in tcl.
>
> → the difference is that the thread-local-storage is an STATIC REFERENCE
> in python and a POINTER in tcl.
>
> → the "aggressive" build does NOT use threads at all and the change
> between python and tcl is more compare-able
> but is still ~20%
>

I think the point that androwish was making, without seeing the code we
can not tell if you did something in a way that takes more time than
doing it in a slightly different way.

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 13:04 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 15:04:10 +0200
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <v9kuca$v56o$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9gh08$2gpu$1@dont-email.me>
<v9hrrt$crh9$1@dont-email.me> <v9hskj$crh9$2@dont-email.me>
<t31vO.417523$qO%5.288038@fx16.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 15 Aug 2024 15:04:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="514a82ae8c88ad60ceb4cbc7e4e4d495";
logging-data="1021144"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mtI0TfyTphEkbAVcBbjEoXzUUBZUbDRk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:RuCydmMKS2RiYcCnlGZItvKARW0=
Content-Language: en-US
In-Reply-To: <t31vO.417523$qO%5.288038@fx16.iad>
View all headers

On 14.08.24 14:04, Gerald Lester wrote:
> On 8/14/24 04:16, aotto1968 wrote:
>> the first analyses is quite simple:
>>
>> right now python does NOT support threads in NHI1 (will change soon) and tcl does…
>> this has an influence on the "release" build because this is NHI1 without threads in python and with
>> threads in tcl.
>>
>> → the difference is that the thread-local-storage is an STATIC REFERENCE in python and a POINTER in tcl.
>>
>> → the "aggressive" build does NOT use threads at all and the change between python and tcl is more compare-able
>> but is still ~20%
>>
>
> I think the point that androwish was making, without seeing the code we can not tell if you did something in a way that takes
> more time than doing it in a slightly different way.

I use the kcachegrind to debug the performance but there are a lot of "small" points to end-up in the ~20% loss against python.

-> I cannot post a "picture" because the "newsgroup does NOT accept pictures …
-> must of the code is in the TCL-C-Api for example:

Example my "ServiceCall" function: at the end of a service call I use:

if (ret == TCL_OK) {
Tcl_ResetResult(interp);
return MkErrorGetCode_0E();
}

and this simple "Tcl_ResetResult" eat 0,8% of the total performance → this is 75% of my "ServiceCall" performance.

-> not trivial, it seems that the Python people with a lot of “manpower” have already MAXIMIZED the optimization of Python.

If I step in Tcl_ResetResult the highlight is:

% eat Total performance -> function name
1,09% -> ResetObjectResult
0,54% -> FreeByteArrayInternalRep (this object is variable size around ~ 1000 bytes)

mfg ao

Subject: Re: tcl versa python regarding performance
From: Alan Grunwald
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 13:30 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam.nurdglaw@gmail.com (Alan Grunwald)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 14:30:43 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <v9kvvk$vh1c$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9gh08$2gpu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 15 Aug 2024 15:31:32 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="105547229f30cd028dc4055ff855b809";
logging-data="1033260"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KPws0YROJZCLqwOvQZDmZUQYS7ilrBsQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ujiVNqcTaOHPxgWObl2f1ozWkxU=
In-Reply-To: <v9gh08$2gpu$1@dont-email.me>
Content-Language: en-US
View all headers

On 13/08/2024 21:51, undroidwish wrote:
> On 8/13/24 22:40, aotto1968 wrote:
>
>> Hi, some (unproven) statistics from my SW regarding the performance TCL
>             ^^^^^^^^
>
> Exactly. I tend to go even further and add the attribute useless to
> unproven as long as you publish some numbers with some subjective
> analysis without presenting the implementation and the measurement
> method.
+1

Subject: Re: tcl versa python regarding performance
From: Gerald Lester
Newsgroups: comp.lang.tcl
Organization: fastusenet - www.fastusenet.org
Date: Thu, 15 Aug 2024 14:20 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-3.nntp.ord.giganews.com!nntp.giganews.com!news-out.netnews.com!s1-1.netnews.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: tcl versa python regarding performance
Newsgroups: comp.lang.tcl
References: <v9ggb7$2dcu$1@dont-email.me> <v9gh08$2gpu$1@dont-email.me>
<v9kvvk$vh1c$1@dont-email.me>
Content-Language: en-US
From: Gerald.Lester@gmail.com (Gerald Lester)
In-Reply-To: <v9kvvk$vh1c$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 13
Message-ID: <a9ovO.138813$2yaa.11659@fx42.iad>
X-Complaints-To: abuse@fastusenet.org
NNTP-Posting-Date: Thu, 15 Aug 2024 14:20:54 UTC
Organization: fastusenet - www.fastusenet.org
Date: Thu, 15 Aug 2024 09:20:54 -0500
X-Received-Bytes: 1211
X-Original-Bytes: 1160
View all headers

On 8/15/24 08:30, Alan Grunwald wrote:
> On 13/08/2024 21:51, undroidwish wrote:
>> On 8/13/24 22:40, aotto1968 wrote:
>>
>>> Hi, some (unproven) statistics from my SW regarding the performance TCL
>>              ^^^^^^^^
>>
>> Exactly. I tend to go even further and add the attribute useless to
>> unproven as long as you publish some numbers with some subjective
>> analysis without presenting the implementation and the measurement
>> method.
> +1
+2

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 18:27 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 20:27:50 +0200
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <v9lhb6$123t3$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 15 Aug 2024 20:27:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="514a82ae8c88ad60ceb4cbc7e4e4d495";
logging-data="1118115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xrnD3yHu3eroqqhInpKAO36q5eg9KlRs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Un5G8mgy9fN0rmAEQEMtOdOGevo=
Content-Language: en-US
In-Reply-To: <v9ggb7$2dcu$1@dont-email.me>
View all headers

To be more precise I add an image to show the differences TCL versa PYTHON on an the example wrapper function

-> ReadI8

This is from the debugging environment with tcl/py & extension compiled in debug mode.

https://i.postimg.cc/NjXccdRC/performance-check-tcl-versa-python.png

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 18:43 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 20:43:28 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <v9li8g$123t3$2@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 15 Aug 2024 20:43:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="514a82ae8c88ad60ceb4cbc7e4e4d495";
logging-data="1118115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oa9nXIPv2Jb4ccBTTb9GO31YtSgTFkAk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:8arFdmuz3lTJLc5GsVeAeMVhRGs=
Content-Language: en-US
In-Reply-To: <v9lhb6$123t3$1@dont-email.me>
View all headers

On 15.08.24 20:27, aotto1968 wrote:
>
> To be more precise I add an image to show the differences TCL versa PYTHON on an the example wrapper function
>
> -> ReadI8
>
> This is from the debugging environment with tcl/py & extension compiled in debug mode.
>
> https://i.postimg.cc/NjXccdRC/performance-check-tcl-versa-python.png
>
>

better link → with callgraph
https://i.postimg.cc/TYbNKXrn/performance-check-tcl-versa-python.png

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 19:09 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 21:09:40 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <v9ljpk$123t3$3@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 15 Aug 2024 21:09:41 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="514a82ae8c88ad60ceb4cbc7e4e4d495";
logging-data="1118115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18n9LFNwR4Cajgh1bS3VkrVGv4iFtsJxAs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9R5y4cbWfLXiWp39aGbOoXrRL7E=
Content-Language: en-US
In-Reply-To: <v9li8g$123t3$2@dont-email.me>
View all headers

On 15.08.24 20:43, aotto1968 wrote:
> On 15.08.24 20:27, aotto1968 wrote:
>>
>> To be more precise I add an image to show the differences TCL versa PYTHON on an the example wrapper function
>>
>> -> ReadI8
>>
>> This is from the debugging environment with tcl/py & extension compiled in debug mode.
>>
>> https://i.postimg.cc/NjXccdRC/performance-check-tcl-versa-python.png
>>
>>
>
> better link → with callgraph
> https://i.postimg.cc/TYbNKXrn/performance-check-tcl-versa-python.png

even better resolution: https://i.postimg.cc/wvpJV4QC/performance-check-tcl-versa-python.png

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 19:18 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 21:18:29 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <v9lka6$123t3$4@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 15 Aug 2024 21:18:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="514a82ae8c88ad60ceb4cbc7e4e4d495";
logging-data="1118115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iisZauqRPQ7IVzKSvIF7wKRq98vqmBRM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:OU+pW9oDKjAToJAbBuTiUNjCeZw=
Content-Language: en-US
In-Reply-To: <v9ljpk$123t3$3@dont-email.me>
View all headers

On 15.08.24 21:09, aotto1968 wrote:
> On 15.08.24 20:43, aotto1968 wrote:
>> On 15.08.24 20:27, aotto1968 wrote:
>>>
>>> To be more precise I add an image to show the differences TCL versa PYTHON on an the example wrapper function
>>>
>>> -> ReadI8
>>>
>>> This is from the debugging environment with tcl/py & extension compiled in debug mode.
>>>
>>> https://i.postimg.cc/NjXccdRC/performance-check-tcl-versa-python.png
>>>
>>>
>>
>> better link → with callgraph
>> https://i.postimg.cc/TYbNKXrn/performance-check-tcl-versa-python.png
>
> even better resolution: https://i.postimg.cc/wvpJV4QC/performance-check-tcl-versa-python.png

bad that I can not EDIT old data of this news message… the problem is that the "postimage" stuff
changes the resolution of the image → bad

I switch to the good old Facebook to post this screenshot and wait for your comment.

-> https://www.facebook.com/share/p/wihmQPR4pBRacLLF/

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 21:48 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 23:48:37 +0200
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <v9lt3n$13q5g$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 15 Aug 2024 23:48:39 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="514a82ae8c88ad60ceb4cbc7e4e4d495";
logging-data="1173680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mhuFeO2MzFEvHjYLIp9aC2esB7lCgKSk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1/VoQHpnovC2VK9nd3Ci4V6B/vU=
Content-Language: en-US
In-Reply-To: <v9lhb6$123t3$1@dont-email.me>
View all headers

a short conclusion from Facebook …

"If you analyze the C lib wrapper for MqReadI8, the TCL code adds about 200% wrapper load and the PYTHON code adds about 10%
wrapper load." (ref: https://www.facebook.com/share/p/wihmQPR4pBRacLLF/)

→ I think TCL has an "performance-problem".

Subject: Re: tcl versa python regarding performance
From: saito
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 15 Aug 2024 23:39 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saito)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Thu, 15 Aug 2024 19:39:56 -0400
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <v9m3kd$14n4t$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 16 Aug 2024 01:39:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="aaad65c86d4c70472f0721c53383ee63";
logging-data="1203357"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oZDVYyRMcKorMA+GSqu0p"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:c3/U0CHoWAUlO0jSmF2RCvyjaVE=
In-Reply-To: <v9ljpk$123t3$3@dont-email.me>
Content-Language: en-US
View all headers

On 8/15/2024 3:09 PM, aotto1968 wrote:
>
> even better resolution:
> https://i.postimg.cc/wvpJV4QC/performance-check-tcl-versa-python.png

Very nice screenshots. Is this some sort a debugger?

Assuming that you wrote both tcl and python versions and that they both
wrap the same core library, wouldn't the call trees look the same or at
least bear resemblance?

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 05:34 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 07:34:15 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <v9mocn$1aus0$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
<v9m3kd$14n4t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Aug 2024 07:34:16 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3624925180c4abfa43b965e00f9f9a60";
logging-data="1407872"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19o6cvp5ALgJ2CsZsb5C6G9va9prnivPZc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:UCnXO1Xwhx+/fUnuoaTuMCFcqkw=
Content-Language: en-US
In-Reply-To: <v9m3kd$14n4t$1@dont-email.me>
View all headers

On 16.08.24 01:39, saito wrote:
> On 8/15/2024 3:09 PM, aotto1968 wrote:
>>
>> even better resolution: https://i.postimg.cc/wvpJV4QC/performance-check-tcl-versa-python.png
>
> Very nice screenshots. Is this some sort a debugger?
>
> Assuming that you wrote both tcl and python versions and that they both wrap the same core library, wouldn't the call trees look
> the same or at least bear resemblance?

Yes, both the TCL and PYTHON extensions are wrappers for the same library and the TOOL for writing both wrappers is the NHI1/ALC
(All-Language-Compiler), that is why both wrappers look similar.

the memory debugger has two parts
1) valgrind --tool=callgrind --quiet ... your sw → create callgrind.out.*
2) kcachegrind callgrind.out.* → create the view

Subject: Re: tcl versa python regarding performance
From: Christian Gollwitzer
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 07:12 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: auriocus@gmx.de (Christian Gollwitzer)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 09:12:52 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <v9mu5l$1bolj$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9lt3n$13q5g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Aug 2024 09:12:53 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d89571cb46a6116aa1a0a90e15068b8d";
logging-data="1434291"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1PLCvyXEVN64/ebV1fTiwFU3EOlrIFH4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Oy2dkLln2nbbMAR2EynRXbOWw3I=
In-Reply-To: <v9lt3n$13q5g$1@dont-email.me>
View all headers

Am 15.08.24 um 23:48 schrieb aotto1968:
> a short conclusion from Facebook …
>
> "If you analyze the C lib wrapper for MqReadI8, the TCL code adds about
> 200% wrapper load and the PYTHON code adds about 10% wrapper load."
> (ref: https://www.facebook.com/share/p/wihmQPR4pBRacLLF/)
>
> → I think TCL has an "performance-problem".

I won't solve the problem, just to say: It's impossible to help you with
this, because you don't explain:
* who wrote this wrapper
* where to find the code
* what benchmark are you running

It could be, e.g. that your benchmark code introduces shimmering and
then there's lots of conversion going on. It might be something
completely different. Or it might be that Tcl is indeed slower than
Python (in most of my comparisons, it was the opposite - unless you
offload work to external libraries).

Regards,

Christian

Subject: Re: tcl versa python regarding performance
From: undroidwish
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 08:41 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: undroidwish@googlemail.com (undroidwish)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 10:41:32 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <v9n3bs$1ch3l$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9lt3n$13q5g$1@dont-email.me> <v9mu5l$1bolj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Aug 2024 10:41:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="34b56ed52d68767c807bae5e4d40e3a2";
logging-data="1459317"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+opPfjKzHA0cm85IdXMdofyoPPQgx1s1A="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:Cu5OtpHsG8ohivOekMsxB7m0HU4=
Content-Language: en-US
In-Reply-To: <v9mu5l$1bolj$1@dont-email.me>
View all headers

On 8/16/24 09:12, Christian Gollwitzer wrote:
> Am 15.08.24 um 23:48 schrieb aotto1968:

>> ...
>> → I think TCL has an "performance-problem".
>
> I won't solve the problem, just to say: It's impossible to help you with
> this, because you don't explain:
> * who wrote this wrapper
> * where to find the code
> * what benchmark are you running
> ...

+1

PS: Philosophically, the perpetual perception of performance problems
is inherent to human design (and possibly inextricable even).

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 09:44 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 11:44:26 +0200
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <v9n71q$1cu04$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9lt3n$13q5g$1@dont-email.me> <v9mu5l$1bolj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Aug 2024 11:44:27 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3624925180c4abfa43b965e00f9f9a60";
logging-data="1472516"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xEroAy5APXRvMHts0vTRcgwn/KTqIAfg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:QRVcQMoNjW5+Bb0XpxVP8SnVyZU=
In-Reply-To: <v9mu5l$1bolj$1@dont-email.me>
Content-Language: en-US
View all headers

On 16.08.24 09:12, Christian Gollwitzer wrote:
> Am 15.08.24 um 23:48 schrieb aotto1968:
>> a short conclusion from Facebook …
>>
>> "If you analyze the C lib wrapper for MqReadI8, the TCL code adds about 200% wrapper load and the PYTHON code adds about 10%
>> wrapper load." (ref: https://www.facebook.com/share/p/wihmQPR4pBRacLLF/)
>>
>> → I think TCL has an "performance-problem".
>
> I won't solve the problem, just to say: It's impossible to help you with this, because you don't explain:
> * who wrote this wrapper
> * where to find the code
> * what benchmark are you running
>
> It could be, e.g. that your benchmark code introduces shimmering and then there's lots of conversion going on. It might be
> something completely different. Or it might be that Tcl is indeed slower than Python (in most of my comparisons, it was the
> opposite - unless you offload work to external libraries).
>
> Regards,
>
>       Christian

1) just the "stupid" Tcl_ObjectGetMetadata to retrieve the pointer associated with an oo-object cost 1/3 of the wrapper
performance → the whole header of a tcl OO wrapper cost more than everything else in the wrapper.

-> if you look into the code it is an hash-table lookup !!!
-> in python it is a ZERO-time operation

2) just to create an INT-object from an integer the TCL create always an object from scratch inclusive malloc etc
-> python uses for small numbers (integer) a table of already pre-alloc objects as ZERO-time operation

3) the set/reset-result have to free all the (stupid) objects that add additional 1/3 of the wrapper cost

analysis.

-> the Tcl_ObjectGetMetadata is clear an design-error
-> the missing small-int-object pre-alloc is an programmer-lazy-error

if someone can setup a screen sharing session than I can explain the problem in more detail
( need to test the screen-sharing first because because I not use to it )

Subject: Re: tcl versa python regarding performance
From: saito
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 18:29 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saito)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 14:29:44 -0400
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <v9o5qq$1h866$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
<v9m3kd$14n4t$1@dont-email.me> <v9mocn$1aus0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 16 Aug 2024 20:29:46 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ee7c3e36f879a0bb903a276ecfb2098a";
logging-data="1614022"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18E/6FVOat38TCnqN3xKK7e"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:oqIGEU0UcCP+L7fhchSFaNeIhzI=
In-Reply-To: <v9mocn$1aus0$1@dont-email.me>
Content-Language: en-US
View all headers

On 8/16/2024 1:34 AM, aotto1968 wrote:
> On 16.08.24 01:39, saito wrote:
>> On 8/15/2024 3:09 PM, aotto1968 wrote:
>>>
>>> even better resolution:
>>> https://i.postimg.cc/wvpJV4QC/performance-check-tcl-versa-python.png
>>
>> Very nice screenshots. Is this some sort a debugger?
>>
>> Assuming that you wrote both tcl and python versions and that they
>> both wrap the same core library, wouldn't the call trees look the same
>> or at least bear resemblance?
>
>
> Yes, both the TCL and PYTHON extensions are wrappers for the same
> library and the TOOL for writing both wrappers is the NHI1/ALC
> (All-Language-Compiler), that is why both wrappers look similar.

What I meant was that the two images look very different. I can't make
out what the boxes say, but nevertheless one is wide and shallow, the
other narrow and deep. So this may not be an apples-to-apples
comparison. As has been noted already, shimmering may play a role here
or extra levels of abstraction via extra proc calls may skew the results
in one language vs. the other.

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 20:16 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 22:16:25 +0200
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <v9oc2s$1i6n2$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Aug 2024 22:16:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3624925180c4abfa43b965e00f9f9a60";
logging-data="1645282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+t7mDYGfUk+TtG5GXOaiFyxVqjXTHoNWA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:QJ5LAD7ys25CrU9D7cKVY8PdoJ0=
Content-Language: en-US
In-Reply-To: <v9ggb7$2dcu$1@dont-email.me>
View all headers

I spend some time on research and further optimization ... but ...

One thing seems clear: "lang-Python" with AGGRESSIVE optimization is NOT far from "lang-C" speed.
With aggressive optimization, Python creates a runtime optimization (--enable-optimizations) during compilation and that WITH
threads which, unlike TCL, CANNOT be disabled in Python. Also, the runtime library is FIRMLY integrated into Python.

TCL with aggressive optimization also uses the static runtime library BUT no threads.

→ for updates check the picture in the comment. https://www.facebook.com/share/p/WYmfnRWybY1Sh42f/

summary for aggressive …

> .../perf-aggressive/inst/sbin/c/x86_64-suse-linux-gnu-perfclient --timeout 2 --send --sec 4 @
..../perf-aggressive/inst/sbin/c/x86_64-suse-linux-gnu-perfserver
:PerfClientExec }: start ------------------------ : result [ count / sec ]
:statistics }: --send : 403779.6 [ 1615234 / 4.000286 ]
:PerfClientExec }: end: ----------------------------------------

> .../perf-aggressive/inst/sbin/c/x86_64-suse-linux-gnu-perfclient --timeout 2 --send --sec 4 @ $PYTHON
..../perf-aggressive/inst/sbin/py/x86_64-suse-linux-gnu-perfserver.py
:PerfClientExec }: start ------------------------ : result [ count / sec ]
:statistics }: --send : 311506.7 [ 1246216 / 4.000608 ]
:PerfClientExec }: end: ----------------------------------------

> .../perf-aggressive/inst/sbin/c/x86_64-suse-linux-gnu-perfclient --timeout 2 --send --sec 4 @ $TCLSH
..../perf-aggressive/inst/sbin/tcl/x86_64-suse-linux-gnu-perfserver.tcl
:PerfClientExec }: start ------------------------ : result [ count / sec ]
:statistics }: --send : 227151.4 [ 908663 / 4.000253 ]
:PerfClientExec }: end: ----------------------------------------

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 16 Aug 2024 20:19 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Fri, 16 Aug 2024 22:19:27 +0200
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <v9oc8f$1i6n2$2@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
<v9m3kd$14n4t$1@dont-email.me> <v9mocn$1aus0$1@dont-email.me>
<v9o5qq$1h866$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Aug 2024 22:19:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3624925180c4abfa43b965e00f9f9a60";
logging-data="1645282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/E7xat/r/Ffkv6CFPVHhgPVEpb19x4A/8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:q/87ZE3mVH5klbJB2Q4mTJdh8iI=
Content-Language: en-US
In-Reply-To: <v9o5qq$1h866$1@dont-email.me>
View all headers

On 16.08.24 20:29, saito wrote:
> On 8/16/2024 1:34 AM, aotto1968 wrote:
>> On 16.08.24 01:39, saito wrote:
>>> On 8/15/2024 3:09 PM, aotto1968 wrote:
>>>>
>>>> even better resolution: https://i.postimg.cc/wvpJV4QC/performance-check-tcl-versa-python.png
>>>
>>> Very nice screenshots. Is this some sort a debugger?
>>>
>>> Assuming that you wrote both tcl and python versions and that they both wrap the same core library, wouldn't the call trees
>>> look the same or at least bear resemblance?
>>
>>
>> Yes, both the TCL and PYTHON extensions are wrappers for the same library and the TOOL for writing both wrappers is the
>> NHI1/ALC (All-Language-Compiler), that is why both wrappers look similar.
>
>
> What I meant was that the two images look very different. I can't make out what the boxes say, but nevertheless one is wide and
> shallow, the other narrow and deep. So this may not be an apples-to-apples comparison. As has been noted already, shimmering may
> play a role here or extra levels of abstraction via extra proc calls may skew the results in one language vs. the other.
>
>

these two pictures are generated by the tool and not by me…
-> the TCL picture is so "wide" because the TCL uses a lot of "overhead"
-> the python picture is so "narrow" because PYTHON uses much less "overhead".

Subject: Re: tcl versa python regarding performance
From: undroidwish
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Sat, 17 Aug 2024 04:27 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: undroidwish@googlemail.com (undroidwish)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Sat, 17 Aug 2024 06:27:22 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <v9p8ra$1pl6h$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
<v9m3kd$14n4t$1@dont-email.me> <v9mocn$1aus0$1@dont-email.me>
<v9o5qq$1h866$1@dont-email.me> <v9oc8f$1i6n2$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 17 Aug 2024 06:27:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3c1efcc4fcc4c49e50dd8bf6eef17106";
logging-data="1889489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RDM5Kga4ordemCG07IbfEiLGSuWmeynw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:BQVZdyKOl3P+W8jM9RYzRxxFOKM=
In-Reply-To: <v9oc8f$1i6n2$2@dont-email.me>
Content-Language: en-US
View all headers

On 8/16/24 22:19, aotto1968 wrote:

> ...
> these two pictures are generated by the tool and not by me…
> -> the TCL picture is so "wide" because the TCL uses a lot of "overhead"
> -> the python picture is so "narrow" because PYTHON uses much less
> "overhead".

Hmm, so here we are:

a) you complain about Tcl's bad performance
b) you seem to be unwilling to disclose enough information about the
Python and Tcl implementations in order to get the big picture and
see the cause of differences and to try to discuss improvements
with you
c) due to b) you continue to complain about Tcl's bad performance

Not quite a fruitful cycle.

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Sat, 17 Aug 2024 05:28 UTC
References: 1 2 3 4 5 6 7 8 9
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Sat, 17 Aug 2024 07:28:59 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <v9pcer$1q1o8$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
<v9m3kd$14n4t$1@dont-email.me> <v9mocn$1aus0$1@dont-email.me>
<v9o5qq$1h866$1@dont-email.me> <v9oc8f$1i6n2$2@dont-email.me>
<v9p8ra$1pl6h$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 17 Aug 2024 07:29:00 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="03c8a19e065ccea23ce8c62d56f4218b";
logging-data="1902344"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KJ0aAfu12ySQCBWlVeKKLKISJacRqFWI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:QlT2zr6WctKBC8O67HbMqYMAeS8=
Content-Language: en-US
In-Reply-To: <v9p8ra$1pl6h$1@dont-email.me>
View all headers

On 17.08.24 06:27, undroidwish wrote:
> On 8/16/24 22:19, aotto1968 wrote:
>
>> ...
>> these two pictures are generated by the tool and not by me…
>> -> the TCL picture is so "wide" because the TCL uses a lot of "overhead"
>> -> the python picture is so "narrow" because PYTHON uses much less "overhead".
>
> Hmm, so here we are:
>
> a) you complain about Tcl's bad performance
> b) you seem to be unwilling to disclose enough information about the
>    Python and Tcl implementations in order to get the big picture and
>    see the cause of differences and to try to discuss improvements
>    with you
> c) due to b) you continue to complain about Tcl's bad performance
>
> Not quite a fruitful cycle.
>
>
I'm "not" complain about TCL bad performance I just mention that PYTHON has
done much more work on performance than TCL.

If you have 300.000 transaction per second (PYTHON) or 200.000 transaction
per second (TCL) is just an case for someone who need this difference.

Subject: Re: tcl versa python regarding performance
From: undroidwish
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Sat, 17 Aug 2024 07:59 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: undroidwish@googlemail.com (undroidwish)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Sat, 17 Aug 2024 09:59:41 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <v9pl9e$1r907$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me> <v9lhb6$123t3$1@dont-email.me>
<v9li8g$123t3$2@dont-email.me> <v9ljpk$123t3$3@dont-email.me>
<v9m3kd$14n4t$1@dont-email.me> <v9mocn$1aus0$1@dont-email.me>
<v9o5qq$1h866$1@dont-email.me> <v9oc8f$1i6n2$2@dont-email.me>
<v9p8ra$1pl6h$1@dont-email.me> <v9pcer$1q1o8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 17 Aug 2024 09:59:42 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="3c1efcc4fcc4c49e50dd8bf6eef17106";
logging-data="1942535"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/44siprXR1A96rY+fdOD/94NoNMTMGm+U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:3eT2G5U3f8WGi3iNrSfV3SXZojY=
In-Reply-To: <v9pcer$1q1o8$1@dont-email.me>
Content-Language: en-US
View all headers

On 8/17/24 07:28, aotto1968 wrote:

> ...
> I'm "not" complain about TCL bad performance I just mention that PYTHON has
> done much more work on performance than TCL.

Fine, then please elaborate on this claim. What exactly did Python
better and more in terms of performance? Any pointers welcome.

> If you have 300.000 transaction per second (PYTHON) or 200.000 transaction
> per second (TCL) is just an case for someone who need this difference.

Indeed could this be a reason to ask if there are better ways of using
the Tcl framework in order to get the Tcl implementation be on par with
the Python one. As stated many times before, to discuss this on c.l.t.
will require that you provide more implementation details.

Subject: Re: tcl versa python regarding performance
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Sun, 18 Aug 2024 20:42 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl versa python regarding performance
Date: Sun, 18 Aug 2024 22:42:21 +0200
Organization: A noiseless patient Spider
Lines: 3
Message-ID: <v9tmbd$2gvah$1@dont-email.me>
References: <v9ggb7$2dcu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 18 Aug 2024 22:42:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a7fbc7106b976c00dac0cc83ba26983d";
logging-data="2653521"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tUH0E30m7S+6tyQavwzzJXfkf1+HtMXA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:wfH1eBd0SABsEBvB5zNvuRzFrvs=
In-Reply-To: <v9ggb7$2dcu$1@dont-email.me>
Content-Language: en-US
View all headers

add some documentation regarding the performance testing:
-> http://thedev.nhi1.de/theLink/main/md_docs_2main_2README__PERFORMANCE.htm

Pages:12

rocksolid light 0.9.8
clearnet tor