On Sunday, 11 June 2023 at 00:05:52 UTC, H. S. Teoh wrote:
On Sat, Jun 10, 2023 at 09:58:12PM +, Cecil Ward via
Digitalmars-d-learn wrote:
On Friday, 9 June 2023 at 15:07:54 UTC,
[...]
On contemporary machines, the CPU is so fast that memory access
is a much bigger bottleneck than
On Sat, Jun 10, 2023 at 09:58:12PM +, Cecil Ward via Digitalmars-d-learn
wrote:
> On Friday, 9 June 2023 at 15:07:54 UTC, Murloc wrote:
[...]
> > So you can optimize memory usage by using arrays of things smaller
> > than `int` if these are enough for your purposes, but what about
> > using
On Saturday, 10 June 2023 at 21:58:12 UTC, Cecil Ward wrote:
On Friday, 9 June 2023 at 15:07:54 UTC, Murloc wrote:
On Friday, 9 June 2023 at 12:56:20 UTC, Cecil Ward wrote:
[...]
Is this some kind of property? Where can I read more about
this?
My last example is comms. Protocol headers
On Friday, 9 June 2023 at 15:07:54 UTC, Murloc wrote:
On Friday, 9 June 2023 at 12:56:20 UTC, Cecil Ward wrote:
On Friday, 9 June 2023 at 11:24:38 UTC, Murloc wrote:
If you have four ubyte variables in a struct and then
an array of them, then you are getting optimal memory usage.
Is this
On Friday, 9 June 2023 at 23:51:07 UTC, Basile B. wrote:
Yes, a classsic resource is
http://www.catb.org/esr/structure-packing/
So you can optimize memory usage by using arrays of things
smaller than `int` if these are enough for your purposes,
So, is the sorting correct in a structure like
On Friday, 9 June 2023 at 15:07:54 UTC, Murloc wrote:
On Friday, 9 June 2023 at 12:56:20 UTC, Cecil Ward wrote:
On Friday, 9 June 2023 at 11:24:38 UTC, Murloc wrote:
If you have four ubyte variables in a struct and then
an array of them, then you are getting optimal memory usage.
Is this
On 6/9/23 08:07, Murloc wrote:
> Where can I read more about this?
I had written something related:
http://ddili.org/ders/d.en/memory.html#ix_memory..offsetof
The .offsetof appears at that point. The printObjectLayout() function
example there attempts to visualize the layout of the members
On Friday, 9 June 2023 at 15:07:54 UTC, Murloc wrote:
On Friday, 9 June 2023 at 12:56:20 UTC, Cecil Ward wrote:
On Friday, 9 June 2023 at 11:24:38 UTC, Murloc wrote:
If you have four ubyte variables in a struct and then
an array of them, then you are getting optimal memory usage.
Is this
On Fri, Jun 09, 2023 at 11:24:38AM +, Murloc via Digitalmars-d-learn wrote:
[...]
> Which raised another question: since objects of types smaller than
> `int` are promoted to `int` to use integer arithmetic on them anyway,
> is there any point in using anything of integer type less than `int`
On Friday, 9 June 2023 at 12:56:20 UTC, Cecil Ward wrote:
On Friday, 9 June 2023 at 11:24:38 UTC, Murloc wrote:
If you have four ubyte variables in a struct and then
an array of them, then you are getting optimal memory usage.
Is this some kind of property? Where can I read more about this?
On Friday, 9 June 2023 at 11:24:38 UTC, Murloc wrote:
Hi, I was interested why, for example, `byte` and `short`
literals do not have their own unique suffixes (like `L` for
`long` or `u` for `unsigned int` literals) and found the
following explanation:
- "I guess short literal is not
Hi, I was interested why, for example, `byte` and `short`
literals do not have their own unique suffixes (like `L` for
`long` or `u` for `unsigned int` literals) and found the
following explanation:
- "I guess short literal is not supported solely due to the fact
that anything less than
12 matches
Mail list logo