Re: FIFO

2024-05-14 Thread Salih Dincer via Digitalmars-d-learn

On Monday, 13 May 2024 at 15:07:39 UTC, Andy Valencia wrote:

On Sunday, 12 May 2024 at 22:03:21 UTC, Ferhat Kurtulmuş wrote:

https://dlang.org/phobos/std_container_slist.html

This is a stack, isn't it?  LIFO?

Ahh yes. Then use dlist


Thank you.  I read its source, and was curious so I wrote a 
small performance measurement: put 10,000 things in a FIFO, 
pull them back out, and loop around that 10,000 times.  My FIFO 
resulted in:


Also try the code I gave in this thread:
https://forum.dlang.org/post/fgzvdhkdyevtzznya...@forum.dlang.org

In fact, please use this facility in the standard library: 
https://dlang.org/phobos/std_datetime_stopwatch.html#benchmark


SDB@79


Re: Setting field of struct object

2024-05-14 Thread Menjanahary R. R. via Digitalmars-d-learn

On Monday, 22 January 2024 at 08:54:21 UTC, Danilo wrote:

On Monday, 22 January 2024 at 08:35:01 UTC, Joel wrote:

[...]


Nonetheless, this usually used with Objects (new class/struct 
instances), like so:

```d
import std;

[...]


Fluent Interface 😀