Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"An ounce of prevention is worth a ton of code." -- an anonymous programmer


devel / comp.lang.c++ / "Inside STL: The lists"

SubjectAuthor
* "Inside STL: The lists"Lynn McGuire
`* Re: "Inside STL: The lists"Öö Tiib
 `* Re: "Inside STL: The lists"Alf P. Steinbach
  `- Re: "Inside STL: The lists"Öö Tiib

1
"Inside STL: The lists"

<uau5jh$3h24u$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=995&group=comp.lang.c%2B%2B#995

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.c++
Subject: "Inside STL: The lists"
Date: Tue, 8 Aug 2023 14:38:26 -0500
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uau5jh$3h24u$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Aug 2023 19:38:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9689201a4d173b0c1ed3840c82193f85";
logging-data="3704990"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rQCOrf851Mpr8Uob4SH4DtsshG0Xh/YE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:rTP7aKPiXN8EHMNEpfPnWz7PR0U=
Content-Language: en-US
 by: Lynn McGuire - Tue, 8 Aug 2023 19:38 UTC

"Inside STL: The lists" by Raymond Chen
https://devblogs.microsoft.com/oldnewthing/20230804-00/

"The C++ standard library type list represents a doubly-linked list, and
forward_list is a singly-linked list. Fortunately, the implementations
of both of these lists are pretty much what you expect."

Lynn

Re: "Inside STL: The lists"

<31d12d11-4fed-4d60-a9c0-e5cbff8d4d99n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1001&group=comp.lang.c%2B%2B#1001

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:622a:188c:b0:40c:ebdb:7b35 with SMTP id v12-20020a05622a188c00b0040cebdb7b35mr38486qtc.9.1691574767285;
Wed, 09 Aug 2023 02:52:47 -0700 (PDT)
X-Received: by 2002:a63:7044:0:b0:564:1c39:c022 with SMTP id
a4-20020a637044000000b005641c39c022mr53893pgn.5.1691574766748; Wed, 09 Aug
2023 02:52:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Wed, 9 Aug 2023 02:52:46 -0700 (PDT)
In-Reply-To: <uau5jh$3h24u$3@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <uau5jh$3h24u$3@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <31d12d11-4fed-4d60-a9c0-e5cbff8d4d99n@googlegroups.com>
Subject: Re: "Inside STL: The lists"
From: ootiib@hot.ee (Öö Tiib)
Injection-Date: Wed, 09 Aug 2023 09:52:47 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Öö Tiib - Wed, 9 Aug 2023 09:52 UTC

On Tuesday, 8 August 2023 at 22:38:43 UTC+3, Lynn McGuire wrote:
> "Inside STL: The lists" by Raymond Chen
> https://devblogs.microsoft.com/oldnewthing/20230804-00/
>
> "The C++ standard library type list represents a doubly-linked list, and
> forward_list is a singly-linked list. Fortunately, the implementations
> of both of these lists are pretty much what you expect."
>
Besides the controversial O(N) range splice of list and non-constant time
erase and insert of forward_list these are pretty much what you expect.

Re: "Inside STL: The lists"

<uavtq7$3tort$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1004&group=comp.lang.c%2B%2B#1004

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED.77.16.209.10.tmi.telenormobil.no!not-for-mail
From: alf.p.steinbach@gmail.com (Alf P. Steinbach)
Newsgroups: comp.lang.c++
Subject: Re: "Inside STL: The lists"
Date: Wed, 9 Aug 2023 13:37:42 +0200
Organization: A noiseless patient Spider
Message-ID: <uavtq7$3tort$1@dont-email.me>
References: <uau5jh$3h24u$3@dont-email.me>
<31d12d11-4fed-4d60-a9c0-e5cbff8d4d99n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 9 Aug 2023 11:37:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77.16.209.10.tmi.telenormobil.no:77.16.209.10";
logging-data="4121469"; mail-complaints-to="abuse@eternal-september.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-US
In-Reply-To: <31d12d11-4fed-4d60-a9c0-e5cbff8d4d99n@googlegroups.com>
 by: Alf P. Steinbach - Wed, 9 Aug 2023 11:37 UTC

On 2023-08-09 11:52 AM, Öö Tiib wrote:
> On Tuesday, 8 August 2023 at 22:38:43 UTC+3, Lynn McGuire wrote:
>> "Inside STL: The lists" by Raymond Chen
>> https://devblogs.microsoft.com/oldnewthing/20230804-00/
>>
>> "The C++ standard library type list represents a doubly-linked list, and
>> forward_list is a singly-linked list. Fortunately, the implementations
>> of both of these lists are pretty much what you expect."
>>
> Besides the controversial O(N) range splice of list and non-constant time
> erase and insert of forward_list these are pretty much what you expect.

In my opinion Raymon Chen is not trying to hide anything. He's just
noting that /given/ the standard's specification, the implementations
are just what you'd expect. I.e. nothing fancy.

Various possible fancy mods have been discussed in this group.

The most basic one, since lists require dynamic allocation of nodes, to
use internal free lists as caches of nodes, to speed things up (O(1)
allocation after a while, in general). A main reason why that's not done
is probably that if you want speed, neither `std::list` nor
`std::forward_list` should be the default choice. Instead, `std::vector`.

- Alf

Re: "Inside STL: The lists"

<87415343-0e98-4cc2-bb83-00fe840d6016n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1017&group=comp.lang.c%2B%2B#1017

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:622a:20b:b0:403:ae76:1697 with SMTP id b11-20020a05622a020b00b00403ae761697mr15280qtx.1.1691647594314;
Wed, 09 Aug 2023 23:06:34 -0700 (PDT)
X-Received: by 2002:a17:902:fa0c:b0:1bc:4c3d:eb08 with SMTP id
la12-20020a170902fa0c00b001bc4c3deb08mr393735plb.8.1691647593828; Wed, 09 Aug
2023 23:06:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Wed, 9 Aug 2023 23:06:33 -0700 (PDT)
In-Reply-To: <uavtq7$3tort$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <uau5jh$3h24u$3@dont-email.me> <31d12d11-4fed-4d60-a9c0-e5cbff8d4d99n@googlegroups.com>
<uavtq7$3tort$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <87415343-0e98-4cc2-bb83-00fe840d6016n@googlegroups.com>
Subject: Re: "Inside STL: The lists"
From: ootiib@hot.ee (Öö Tiib)
Injection-Date: Thu, 10 Aug 2023 06:06:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 38
 by: Öö Tiib - Thu, 10 Aug 2023 06:06 UTC

On Wednesday, 9 August 2023 at 14:38:00 UTC+3, Alf P. Steinbach wrote:
> On 2023-08-09 11:52 AM, Öö Tiib wrote:
> > On Tuesday, 8 August 2023 at 22:38:43 UTC+3, Lynn McGuire wrote:
> >> "Inside STL: The lists" by Raymond Chen
> >> https://devblogs.microsoft.com/oldnewthing/20230804-00/
> >>
> >> "The C++ standard library type list represents a doubly-linked list, and
> >> forward_list is a singly-linked list. Fortunately, the implementations
> >> of both of these lists are pretty much what you expect."
> >>
> > Besides the controversial O(N) range splice of list and non-constant time
> > erase and insert of forward_list these are pretty much what you expect.
~ > In my opinion Raymon Chen is not trying to hide anything. He's just
> noting that /given/ the standard's specification, the implementations
> are just what you'd expect. I.e. nothing fancy.
>
Yes, I did not mean that Raymond Chen was trying to deceive, just that
with C++ some little bear trap should be anticipated everywhere.

> Various possible fancy mods have been discussed in this group.
>
> The most basic one, since lists require dynamic allocation of nodes, to
> use internal free lists as caches of nodes, to speed things up (O(1)
> allocation after a while, in general). A main reason why that's not done
> is probably that if you want speed, neither `std::list` nor
> `std::forward_list` should be the default choice. Instead, `std::vector`.
>
Yes, take vector if there are no solid reason not to take it. Reason like its
insert and erase being expensive or referential stability inexistent. List
does not have those issues. But more often I see (handrolled or boost)
intrusive variants than std::lists.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor