Date: Sun, 6 Jan 2019 14:17:44 +0000 From: Igor Mozolevsky <igor@hybrid-lab.co.uk> To: Sidju <lists@sidju.se> Cc: Hackers freeBSD <freebsd-hackers@freebsd.org> Subject: Re: Speculative: Rust for base system components Message-ID: <CADWvR2h=DOHB4svGNVWhtxtA-93mSB9OXquX1WWyHGuChGJRZg@mail.gmail.com> In-Reply-To: <F_AcA4FJ0U-WVofCIjpy-MbO3u05dpPDuzYosnFoqZyWPeGwusWA2pcj4C3fpjVMC8Z6tVtS8WslRvc1v5mq1tkUI9E2m5gJsnBpSntMOzI=@sidju.se> References: <201901021829.x02IT4Kc064169@slippy.cwsent.com> <e954a12f-5d23-7a3f-c29b-c93e1250965c@metricspace.net> <361CCB81-AEB6-4EAC-9604-CD8F4C63948C@gmail.com> <CADWvR2ju7y_rcY3MFe_381yBmPXgm1BA7RzA9ZTUfTtCHdFGLw@mail.gmail.com> <6DF138FB-E730-477A-A992-8FE1944DDE94@exonetric.com> <CADWvR2hETR3j2=aNVGDiYfJeyeqgavDQOuxkxrE%2BVZFfD5BzJg@mail.gmail.com> <451787DE-0659-4F7D-B011-904F90866DDB@gmail.com> <CADWvR2ij6rHw-KS6Qm9xMAmJzCCvcpgQ1LHQrGknhiaGep6V1Q@mail.gmail.com> <H7D1D6fUMtF9-2LbnJrYEFnDraYBSD1a0DAK-Wn4UFj9PlkNZXcB5rwWcJ02PqW9vlv0u-wiGjq8JvcqmfczsHD1HxvhXQoLZY52s7EgjW0=@sidju.se> <CADWvR2jJ%2BujN_Sm0EfEx1AfHm88-Dvn2mRMS1=RS-Zwt1L6DKw@mail.gmail.com> <F_AcA4FJ0U-WVofCIjpy-MbO3u05dpPDuzYosnFoqZyWPeGwusWA2pcj4C3fpjVMC8Z6tVtS8WslRvc1v5mq1tkUI9E2m5gJsnBpSntMOzI=@sidju.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 6 Jan 2019 at 14:09, Sidju wrote: > >Don't know where you've been for the earlier discussion, but someone > >did an experiment, and guess what: Rust yielded a massive increase in > >instruction count for a a simple sum-of-integers program, so it's not > >just "runtime library" issue. As for "potential bugs," see below. > > Wasn't that the experiment that sparked the "statically linked by default" > sidetrack? > From all that I have been able to find ( https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/rust-gpp.html ) > rust performs far better than java and go (which is what I contrasted > to) and is not very far behind c and c++ (which I doubt anything will > beat for the next 10 years). > > Admittedly the codesize is increased even with dynamic linking and > there is some cost for those ownership checks when they occur, > but it is not horrendous. Java was given by me as a parody example, don't know why you've taken comparison against Java so seriously... The second experiment was purely on executable instruction count, if I recall correctly, not the binary size; and I'd rather my processor did little work and slept than did a lot of work to achieve the same result and ate electricity. > >> Rust isn't a silver bullet that will fix all bugs. It is a slightly more > >> abstracted and type checking language that is slightly better for a lot > >> of things. If you don't find that slight improvement worth the difficulty > >> it is to learn it, then don't. > > >The gist is: learn a better discipline of programming to make better > >code, not yet-another-many-promises-but-few-deliveries language. > > By that reasoning we should never have left the glorious days of > assembly programming. I'm very much in favour of that---you wouldn't believe how often I think "this is so trivial to do in asm" while fighting "safeguards" and other "curiosities" of C! -- Igor M.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADWvR2h=DOHB4svGNVWhtxtA-93mSB9OXquX1WWyHGuChGJRZg>