From nobody Fri Sep 13 10:33:24 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X4rHq4XnWz5Wf53 for ; Fri, 13 Sep 2024 10:33:27 +0000 (UTC) (envelope-from paulf2718@gmail.com) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X4rHp6Zvqz4tr4 for ; Fri, 13 Sep 2024 10:33:26 +0000 (UTC) (envelope-from paulf2718@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=B++5UVun; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of paulf2718@gmail.com designates 2a00:1450:4864:20::334 as permitted sender) smtp.mailfrom=paulf2718@gmail.com Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42cb57f8b41so10137215e9.0 for ; Fri, 13 Sep 2024 03:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726223605; x=1726828405; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=iicMiPO05ZgzZgODXprj6rP4OgUJ6wQ+caCcty2H2oY=; b=B++5UVunPuaak0BIUmcluKf4P31GhzjNZoXnojm5Aj2MD8ciHrvNka6ybMwUsJOq/D LPEGEszFmQs9TAkZl2byGqoIyd6UhkGYbLzLHGbcTLQKX8Xi9kOAT8Nky+3GqOfo18b+ Shi9gMp5BJE+cVBkc5Nr1vYphf44Bc3V0DMSh7MTj4MnDpPNF/rv2KGaUtz4aTxlbRa5 CDc0naWYQ/d7Mgw/yRI9i89wo+H5BkSxarVKxtzCv827NwhAJZfTUXxgmvLD8PSRpfiK QSSMsM8j+fG0wReD27dznpVyGvCKzYKdSVrpwJP8hDO/Ep/0SlRWyTs0Nu2U6Vc0FuZh UxJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726223605; x=1726828405; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iicMiPO05ZgzZgODXprj6rP4OgUJ6wQ+caCcty2H2oY=; b=ntWGKBoKm5kvA2d5GCf6sRJH8YYhn4Jr9ntdOBPInG1NF9RNThphLzz71/SBkFDDK9 WBCSqPX3nXZ3idxuLi80kJr/6wr2GAkmvh08O+8DXJlGDODUnj7++qtudoaHiY+GUCkZ pQFjD892Iguv1HJJxaRo/y6rcS8uJ+NX0h9tSRZd0lCUTsCP2KJwtcSHoyY51UrO2GKJ ktaiC+2xIpbUSoivNTipy9J+kTaafFwEPOyN1tU/bpD22OaWpkYvvaXSrjl1EK3meIqH UvreyP99oogUYl3OUbQ3tX/cJu25QctKzKi4Elms3VfSQ/JBTS1B+FTTDB9UHX1vD6O0 pz8g== X-Gm-Message-State: AOJu0YzOr5Kq+pEKqtkbBShDXnftljRK7DK6uj/E3Ssq0p55YOLxSSCa C6YQHxmMFi1BUomU17dbmjMbkQcotCqd9qbwlIM9HCMMyaZFWxOqLIrnjQ== X-Google-Smtp-Source: AGHT+IEaNxtpVTQKQZSQssMpaLjUBmWuDFjCZm703Ck+YAKgx2efpNXI0V0yC1ExVecsWX85PaTGDQ== X-Received: by 2002:a05:600c:4714:b0:42c:aef3:4388 with SMTP id 5b1f17b1804b1-42d9070a3e7mr26562285e9.6.1726223605152; Fri, 13 Sep 2024 03:33:25 -0700 (PDT) Received: from ?IPV6:2a01:cb15:801f:7500:1aa9:5ff:fe16:2efb? ([2a01:cb15:801f:7500:1aa9:5ff:fe16:2efb]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b05a783sm19851875e9.9.2024.09.13.03.33.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Sep 2024 03:33:24 -0700 (PDT) Message-ID: Date: Fri, 13 Sep 2024 10:33:24 +0000 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: The Case for Rust (in any system) To: freebsd-hackers@freebsd.org References: <2EE309BF-CE1D-48AD-9C53-D4C87998B4A0@freebsd.org> Content-Language: en-US From: Paul Floyd In-Reply-To: <2EE309BF-CE1D-48AD-9C53-D4C87998B4A0@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::334:from] X-Rspamd-Queue-Id: 4X4rHp6Zvqz4tr4 On 13-09-24 06:17, David Chisnall wrote: > On 13 Sep 2024, at 02:34, Joe Schaefer wrote: >> >> I just completed a month long project to port a C++ codebase that used vectors for array allocations back to using C‘s calloc. For a 15% increase in memory footprint, batch jobs that took three days to complete now finish in 10-12 hours. > > This sounds highly dubious given that std::vector is a very thin wrapper around malloc. From your description, I would expect the same speedup with some judicial use of .reserve(). I was going to say exactly the same thing. Considering the reply to this, another one to be plonked so that I waste less time. A+ Paul