On Saturday, 1 April 2023 at 22:48:46 UTC, Ali Çehreli wrote:
On 4/1/23 15:30, Paul wrote:
> Is there a way to verify that it split up the work in to
tasks/threads
> ...?
It is hard to see the difference unless there is actual work in
the loop that takes time.
I always use the Rowland
On 4/1/23 15:30, Paul wrote:
> Is there a way to verify that it split up the work in to tasks/threads
> ...?
It is hard to see the difference unless there is actual work in the loop
that takes time. You can add a Thread.sleep call. (Commented-out in the
following program.)
Another option is
On Saturday, 1 April 2023 at 18:30:32 UTC, Steven Schveighoffer
wrote:
On 4/1/23 2:25 PM, Paul wrote:
```d
import std.range;
foreach(; iota(0, 2_000_000).parallel)
```
-Steve
Is there a way to tell if the parallelism actually divided up the
work? Both versions of my program run in the
```d
import std.range;
foreach(; iota(0, 2_000_000).parallel)
```
-Steve
Is there a way to verify that it split up the work in to
tasks/threads ...? The example you gave me works...compiles w/o
errors but the execution time is the same as the non-parallel
version. They both take about 6
On Saturday, 1 April 2023 at 15:02:12 UTC, Ali Çehreli wrote:
Does anyone have documentation on why Rust and Zip does not do
thread local by default? I wonder what experience it was based
on.
I think that would hard to get documentation on the rationale for
that decision. Maybe you can
Thanks Steve.
On 4/1/23 2:25 PM, Paul wrote:
Thanks in advance for any assistance.
As the subject line suggests can I do something like? :
```d
foreach (i; taskPool.parallel(0..2_000_000))
```
Obviously this exact syntax doesn't work but I think it expresses the
gist of my challenge.
```d
import
Thanks in advance for any assistance.
As the subject line suggests can I do something like? :
```d
foreach (i; taskPool.parallel(0..2_000_000))
```
Obviously this exact syntax doesn't work but I think it expresses
the gist of my challenge.
On 4/1/23 17:02, Ali Çehreli wrote:
Does anyone have documentation on why Rust and Zip does not do thread
local by default?
Rust just does not do mutable globals except in unsafe code.
On Friday, 31 March 2023 at 13:11:58 UTC, z wrote:
I've tried to search before but was only able to find articles
for 3D triangles, and documentation for OpenGL, which i don't
use.
The first function you posted takes a 3D triangle as input, so I
assumed you're working in 3D. What are you
On 3/26/23 13:41, ryuukk_ wrote:
> C, C++, Rust, Zig, Go doesn't do TLS by default for example
C doesn't do because there was no such concept when it was conceived.
C++ doesn't do because they built on top of C.
(D does because it has always been innovative.)
Go doesn't do because it had no
On Saturday, 1 April 2023 at 13:11:46 UTC, Guillaume Piolat wrote:
TLS could be explicit and we wouldn't need a -vtls flag.
Yeah, I think what we should do is make each thing be explicitly
marked.
When I want tls, I tend to comment that it was intentional anyway
to make it clear I didn't
On Saturday, 1 April 2023 at 08:47:54 UTC, IGotD- wrote:
TLS by default is mistake in my opinion and it doesn't really
help. TLS should be discouraged as much as possible as it is
complicated and slows down thread creation.
It looks like a mistake if we consider none of the D-inspired
On Friday, 31 March 2023 at 19:43:42 UTC, bachmeier wrote:
Those of us that have been scarred by reading FORTRAN 77 code
would disagree. I use global mutables myself (and even the
occasional goto), but if anything, it should be
`__GLOBAL_MUTABLE_VARIABLE` to increase the pain of using them.
On Sunday, 26 March 2023 at 18:25:54 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Having TLS by default is actually quite desirable if you like
your code to be safe without having to do anything extra.
As soon as you go into global to the process memory, you are
responsible for
On Sunday, 26 March 2023 at 18:25:54 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Having TLS by default is actually quite desirable if you like
your code to be safe without having to do anything extra.
As soon as you go into global to the process memory, you are
responsible for
16 matches
Mail list logo