[Top][All Lists]

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

Re: [Nano-devel] [PATCH] Optimize the order of struct members

From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] Optimize the order of struct members
Date: Thu, 23 Aug 2018 19:58:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Op 22-08-18 om 01:46 schreef Devin Hussey:
> I meant to submit this a while ago, it had been bugging me.

Too many things in a single patch.  One issue, one patch.  And
please stop sending HTML mail.

> - Reorder members to reduce padding and wasted RAM, most noticeable on x64

How much memory is saved?  When all syntaxes are included and nano
has opened all src/*.c files.

> - Put links first so foo->next is a simple dereference

Is next really the most used element in all the structures?  I would
think that for the linestruct it would be the data element.

> - Shrink pairnum to a short (ncurses uses a short for this as well)

This might be a good idea.  Separate patch, please.

> - Replace rex_flags with a bool called ignore_case. This prevents using an
>   entire word boundary in x64.

Using a word boundary?  What do you mean?

> - long is an unreliable type, replace it with int.

What do you mean with "unreliable type"?


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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