On Tuesday, 18 February 2014 at 19:55:20 UTC, Etienne wrote:
On 2014-02-18 1:13 PM, "Casper Færgemand"
" wrote:
On Tuesday, 18 February 2014 at 08:11:04 UTC, Dicebot wrote:
I tested some prime sieves both in C++ and D. They worked
fastest with
dynamic arrays with a size matching the L1 cache.
On 2014-02-18 1:13 PM, "Casper Færgemand" " wrote:
On Tuesday, 18 February 2014 at 08:11:04 UTC, Dicebot wrote:
I tested some prime sieves both in C++ and D. They worked fastest with
dynamic arrays with a size matching the L1 cache. I presume the
instructions are located elsewhere in the CPU.
D
On Tuesday, 18 February 2014 at 18:13:24 UTC, Casper Færgemand
wrote:
S[2] s2; // array of two structs, plus a length?
Storing length is not needed for static arrays because it is
known, well, statically.
I tested some prime sieves both in C++ and D. They worked
fastest with dynamic arrays
On Tuesday, 18 February 2014 at 08:11:04 UTC, Dicebot wrote:
None of your buffers are on stack in both examples. As those
are dynamic arrays you only get pointer + length as value and
data itself resides on heap in some unknown location.
That.
struct S {}
class C {}
S[] s1; // fat pointer to
None of your buffers are on stack in both examples. As those are
dynamic arrays you only get pointer + length as value and data
itself resides on heap in some unknown location. It can be in
cache too, of course, if it has been used actively, but it can't
be verified based on this simple snippet
On Tuesday, 18 February 2014 at 03:15:59 UTC, Etienne wrote:
I'm sorry if the question seems complicated, I read everything
Ulrich Drepper had to say in What every programmer should know
about memory, and I still have a bit of a hard time visualizing
the question myself.
I am by far no expe