tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] struct bug: identical named struct members


From: Christian Jullien
Subject: Re: [Tinycc-devel] struct bug: identical named struct members
Date: Sun, 29 Nov 2020 09:48:10 +0100

Hello,
Structures "generally" have around 10 to 20 variables.
There is also cases where there are huge when they collect all "global" 
variables of a lib.
This append for example if you need multiple instance of the same lib, each 
having its own state.
Doing so has the advantage to put variables close together which improves L1 
cache access.
Switching from real global variables to a structures saved me around 2% in 
speed for my OpenLisp compiler.
The structure which contains all OpenLisp variables has around 750 variables!!!

M2c

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On 
Behalf Of Michael Matz
Sent: Sunday, November 29, 2020 00:15
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] struct bug: identical named struct members

Hello again,

On Sun, 29 Nov 2020, Michael Matz wrote:

>>  The only other fast C map I know
>>  of is khash (https://attractivechaos.github.io/klib), however not 
>> memory  efficient, and the codebase is somewhat bigger.
>
> I guess there as many map implementations as there are C developers 
> :-)

Though I should say that yours from C99Containers look nice to use, despite the 
macros-as-template hell in the implementation :-)


Ciao,
Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]