On Wednesday, 28 July 2021 at 21:39:43 UTC, jfondren wrote:
I don't know, but .byValue is @safe and returns a forward
range, so you could use `.init.byValue.array` instead.
Great point. Thanks.
On Wednesday, 28 July 2021 at 21:04:11 UTC, Per Nordlöw wrote:
Why is call to `values` in, for instance,
```d
auto _ = string[string].init.values;
```
not `@safe`?
I don't know, but .byValue is @safe and returns a forward range,
so you could use `.init.byValue.array` instead.
On Wednesday, 28 July 2021 at 16:26:49 UTC, drug wrote:
I profiled the provided example (not `FiberScheduler`) using
perf. Both dmd and ldc2 gave the same result - `void
filterInner(int, int)` took ~90% of the run time. The time was
divided between:
`int
On Wednesday, 28 July 2021 at 16:31:49 UTC, Ali Çehreli wrote:
I assume the opposite because normally, the number of times a
thread or fiber is spawned is nothing compared to the number of
times they are context-switched. So, spawning can be expensive
and nobody would realize as long as
Why is call to `values` in, for instance,
```d
auto _ = string[string].init.values;
```
not `@safe`?
On Wednesday, 28 July 2021 at 14:39:29 UTC, Mathias LANG wrote:
Hence doing:
```diff
- auto scheduler = new FiberScheduler();
+ scheduler = new FiberScheduler();
```
Thanks for pointing it out! Looks like I was benchmarking thread
instead of fiber. I just made the change you suggest but the
On 7/28/21 1:15 AM, hanabi1224 wrote:
> On Wednesday, 28 July 2021 at 01:12:16 UTC, Denis Feklushkin wrote:
>> Spawning fiber is expensive
>
> Sorry but I cannot agree with the logic behind this statement, the whole
> point of using fiber is that, spwaning system thread is expensive, thus
> ppl
28.07.2021 17:39, Mathias LANG пишет:
On Wednesday, 21 July 2021 at 22:51:38 UTC, hanabi1224 wrote:
Hi, I'm new to D lang and encounter some performance issues with
fiber, not sure if there's something obviously wrong with my code.
I took a quick look, and the first problem I saw was that you
On Wednesday, 21 July 2021 at 22:51:38 UTC, hanabi1224 wrote:
Hi, I'm new to D lang and encounter some performance issues
with fiber, not sure if there's something obviously wrong with
my code.
I took a quick look, and the first problem I saw was that you
were using `spawnLinked` but not
On 7/27/21 9:12 PM, Denis Feklushkin wrote:
Spawning fiber is expensive (but not so expensive as spawning thread, of
course), but switching is fast.
Thus, you can spawn and pause "workers" fibers for avaiting of jobs.
(Probably, this behaviour is already implemented in number of libraries
and
On Wednesday, 28 July 2021 at 01:12:16 UTC, Denis Feklushkin
wrote:
Spawning fiber is expensive
Sorry but I cannot agree with the logic behind this statement,
the whole point of using fiber is that, spwaning system thread is
expensive, thus ppl create lightweight thread 'fiber', then if a
On Wednesday, 28 July 2021 at 05:52:02 UTC, Ali Çehreli wrote:
On 7/27/21 10:38 PM, Tejas wrote:
When I initially saw it, I was hopeful that it would allow me
to bypass some of the restrictions of ```const``` , but it
literally just takes a type and strips the ```const``` from
it, you can't
On Wednesday, 28 July 2021 at 05:57:31 UTC, user1234 wrote:
On Wednesday, 28 July 2021 at 05:38:44 UTC, Tejas wrote:
When I initially saw it, I was hopeful that it would allow me
to bypass some of the restrictions of ```const``` , but it
literally just takes a type and strips the ```const```
On Wednesday, 28 July 2021 at 05:38:44 UTC, Tejas wrote:
When I initially saw it, I was hopeful that it would allow me
to bypass some of the restrictions of ```const``` , but it
literally just takes a type and strips the ```const``` from it,
you can't pass a variable to it in order to get rid
14 matches
Mail list logo