Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2024 07:17:20 +0100
From:      David Chisnall <theraven@freebsd.org>
To:        Joe Schaefer <joesuf4@gmail.com>
Cc:        Pat Maddox <pat@patmaddox.com>, Alan Somers <asomers@freebsd.org>, Chris <bsd-lists@bsdforge.com>, Warner Losh <imp@bsdimp.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: The Case for Rust (in any system)
Message-ID:  <2EE309BF-CE1D-48AD-9C53-D4C87998B4A0@freebsd.org>
In-Reply-To: <CAOzHqcJ0rOR4CoL84WgZQNcgY2G9vuiHccE4XT_otJ2R51KJ3Q@mail.gmail.com>
References:  <CAOzHqcJ0rOR4CoL84WgZQNcgY2G9vuiHccE4XT_otJ2R51KJ3Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13 Sep 2024, at 02:34, Joe Schaefer <joesuf4@gmail.com> wrote:
>=20
> I just completed a month long project to port a C++ codebase that used vec=
tors for array allocations back to using C=E2=80=98s calloc. For a 15% incre=
ase in memory footprint, batch jobs that took three days to complete now fin=
ish in 10-12 hours.

This sounds highly dubious given that std::vector is a very thin wrapper aro=
und malloc. =46rom your description, I would expect the same speedup with so=
me judicial use of .reserve().

David=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2EE309BF-CE1D-48AD-9C53-D4C87998B4A0>