[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: number of bits of int type
- From: Nilson <nilson.brazil@...>
- Date: Sun, 3 Oct 2010 10:26:16 -0300
On Sun, Oct 3, 2010 at 9:38 AM, Jon Mayo <email@example.com> wrote:
> On Sun, Oct 3, 2010 at 4:14 AM, Martin Schröder <firstname.lastname@example.org> wrote:
> In my opinion debates about the popularity of an architecture to
> dismiss a feature idea is a waste of time, more so than the time spent
> implementing the unpopular feature. If Lua doesn't work with funny
> word sizes(I never tried it), then people should be encouraged to fork
> a version that does. Maybe it never makes it to the main tree, that
> depends on all sorts of factors, but being part of the common release
> is not the be all and end all of programming.
> No feature is too obscure for a dedicated hacker.
> - Jon
I agree with you Jon.
The motivation for that question was: I'm trying to implement a
optimized way to access part of tt field in Lua's Value structure.
Instead of using MASKs and ANDs (that consumes cpu time) I'm creating
a union of different structures (like Lua's developers did with the
value part of Value) based on octets (bytes). Both will work, but
unions will be faster. So, I would like to estimate how many people
would be penalized by the lack of optimization (disabled on "compile
time") because the architecture does not support two bytes (the
minimum field size).