Deutsch   English   Français   Italiano  
<v9kuca$v56o$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968 <aotto1968@t-online.de>
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>
Bytes: 2864

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