Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #124068

Re: address of or reference ?

From "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups comp.lang.c++
Subject Re: address of or reference ?
Date 2026-06-09 17:03 -0700
Organization A noiseless patient Spider
Message-ID <110a9k2$d024$1@dont-email.me> (permalink)
References <10vtfam$r6s8$1@dont-email.me> <1103v9p$k0c4$5@gwaiyur.mb-net.net> <1108ak4$3onc2$1@dont-email.me> <1108df6$3pijb$2@raubtier-asyl.eternal-september.org> <110a67r$c53m$2@dont-email.me>

Show all headers | View raw


On 6/9/2026 4:05 PM, Lynn McGuire wrote:
> On 6/9/2026 1:56 AM, Bonita Montero wrote:
>> Am 09.06.2026 um 08:08 schrieb Lynn McGuire:
>>
>>> Raw pointers are good for speed, speed, speed.
>>
>> Iterators have the same performance.
> 
> I am talking about pointers going across function calls.

References should be rather identical to pointers. But, you are going to 
have to alter your existing code? That might be a royal PITA...

void foo(bar const& p)
{

}

vs:

void foo(bar const* const p)
{

}

Should be the same wrt the underlying code the compiler spits out...

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-04 22:20 -0500
  Re: address of or reference ? 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-05 06:26 +0200
    Re: address of or reference ? 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-05 06:32 +0200
  Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-05 10:58 +0200
    Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-05 14:04 -0700
      Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-06 12:22 -0700
    Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-05 18:28 -0500
      Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-06 21:12 +0200
    Re: address of or reference ? 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-06 15:28 +0200
      Re: address of or reference ? boltar@caprica.universe - 2026-06-06 14:49 +0000
        Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-06 12:25 -0700
          Re: address of or reference ? boltar@caprica.universe - 2026-06-07 14:42 +0000
            Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-07 11:33 -0700
        Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-07 11:41 +0200
      Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-06 21:21 +0200
        Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-06 12:45 -0700
      Re: address of or reference ? Paavo Helde <eesnimi@osa.pri.ee> - 2026-06-07 00:30 +0300
  Re: address of or reference ? Paavo Helde <eesnimi@osa.pri.ee> - 2026-06-05 19:24 +0300
  Re: address of or reference ? Marcel Mueller <news.5.maazl@spamgourmet.org> - 2026-06-07 16:30 +0200
    Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-09 01:08 -0500
      Re: address of or reference ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-06-09 08:56 +0200
        Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-09 18:05 -0500
          Re: address of or reference ? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-09 16:42 -0700
            Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-09 19:37 -0500
              Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-10 09:21 +0200
          Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-09 17:03 -0700
    Re: address of or reference ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-06-09 08:56 +0200

csiph-web