On Thursday, 2 February 2023 at 13:49:18 UTC, Siarhei Siamashka
wrote:
On Thursday, 2 February 2023 at 10:47:19 UTC, Salih Dincer
wrote:
#line1 31 µs
#line2 33 µs
Percent %0
Yes, there is a difference between O1 and O2 that cannot be
understood with a benchmark!
#line1 6005 µs
#line2 122 µ
On Thursday, 2 February 2023 at 10:47:19 UTC, Salih Dincer wrote:
It can be seen below that the structure (LimitedArray)
implemented with
union is at least 15 times and at most 20 times faster.
Except that it isn't. How did you manage to get such ridiculous
results? Even running your program
On Thursday, 2 February 2023 at 05:47:34 UTC, Paul Backus wrote:
Here's a solution using standard-library functions:
```d
import std.range: transversal;
import std.algorithm: map, fill;
import std.stdio: writefln;
void main()
{
byte[3][3] myArr;
myArr[]
On Tuesday, 31 January 2023 at 01:04:41 UTC, Paul wrote:
Greetings,
for an array byte[3][3] myArr, I can code myArr[0] = 5 and have:
5,5,5
0,0,0
0,0,0
Can I perform a similar assignment to the column? This,
myArr[][0] = 5, doesn't work.
Thanks!
Here's a solution using standard-library fun
On Wednesday, 1 February 2023 at 05:51:31 UTC, Paul wrote:
Thanks Salih. Much appreciated.
It's my pleasure to solve this problem...
I have struck upon an idea that would not affect (i think) the
speed of the processor requesting memory from the heap on a
page-by-page basis but limited 😀
On Wednesday, 1 February 2023 at 13:14:47 UTC, Siarhei Siamashka
wrote:
On Tuesday, 31 January 2023 at 01:04:41 UTC, Paul wrote:
Greetings,
for an array byte[3][3] myArr, I can code myArr[0] = 5 and
have:
5,5,5
0,0,0
0,0,0
Can I perform a similar assignment to the column? This,
myArr[][0]
On Tuesday, 31 January 2023 at 01:04:41 UTC, Paul wrote:
Greetings,
for an array byte[3][3] myArr, I can code myArr[0] = 5 and have:
5,5,5
0,0,0
0,0,0
Can I perform a similar assignment to the column? This,
myArr[][0] = 5, doesn't work.
This works fine for small arrays, but for large arrays
On Wednesday, 1 February 2023 at 03:45:11 UTC, Salih Dincer wrote:
On Tuesday, 31 January 2023 at 01:04:41 UTC, Paul wrote:
Can I perform a similar assignment to the column? This,
myArr[][0] = 5, doesn't work.
Of course, this question has a short answer and a long answer.
So the issue is mor
Sorry, I forget this:
```d
enum : size_t {
ROW = 3,
COL = 3,
SUM = ROW * COL
}
```
SDB@79
On Tuesday, 31 January 2023 at 01:04:41 UTC, Paul wrote:
Can I perform a similar assignment to the column? This,
myArr[][0] = 5, doesn't work.
Of course, this question has a short answer and a long answer. So
the issue is more about column-major. I am someone who likes to
talk with codes. In
Greetings,
for an array byte[3][3] myArr, I can code myArr[0] = 5 and have:
5,5,5
0,0,0
0,0,0
Can I perform a similar assignment to the column? This,
myArr[][0] = 5, doesn't work.
Thanks!
11 matches
Mail list logo