[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Macros for setting / testing / getting value components in lobject.h
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 10 Jun 2015 11:06:46 -0300
> I overlay the double with the type code.
>
> So the structure looks like this:
>
> |------ first 8 bytes ----------| |------- second 8 bytes -------|
> value other than double type code (int) union
> including 64-bit int with double
>
> Since the size of the value object is 16 bytes anyway it doesn't
> change the overall size.
What do you gain here? The standard representation is this:
|------ first 8 bytes ----------| |------- second 8 bytes -------|
any value including double type code (int)
and 64-bit int
It occupies the same space and it is simpler...
-- Roberto