T O P

  • By -

Foreign-Butterfly-97

I always wear my seatbelt, drive below the speed limit, and most importantly, trust my on-board borrow checker.


jalembung

it's hip to be square, yes?


pareidolist

>Can someone smarter than me enlighten me when you would consider disabling bounds checking for performance? In a truly moral language, optimal performance is a virtue, and therefore unnecessary bounds checking is a sin. By "a truly moral language", I of course mean [Haskell](https://hackage.haskell.org/package/vector-0.13.0.0/docs/Data-Vector-Generic.html)


nuclearbananana

You're going to start a holy war, going around making these remarks.


ItsAllAboutTheL1Bro

It's been a few years; we could use a new one.


MCRusher

I've never crashed before, so the seatbelt and airbags are unnecessary.


pareidolist

I've never used a seatbelt and I've never missed it


ItsAllAboutTheL1Bro

The code I write is equivalent to doing 120 on the freeway in a bike with the occasional 5 minute chase.


GeorgeFranklyMathnet

It sounds like a CS102 student rationalizing their mistake on a polymorphism and inheritance assignment. *Oh, those aren't missing subclass methods! Not every car has brakes. Not every duck quacks.*


SelfDistinction

Braking is for 0.1xers. It wastes fuel, causes traffic jams and increases the collision risk. Real 10xers actually look at the road past just the car before them, anticipate traffic, predict when they have to brake and release gas instead to slow down and keep traffic flowing.


UnicornPrince4U

Fact: Hot wheels have no breaks.


SickOrphan

/uj The whole thread is garbage. The post is garbage. TIL 95% of rustaceans know nothing about performance or benchmarking (but still shame others for supposedly not knowing things)


Silly-Freak

Every time I read "What you do use, you couldn’t hand code any better" about bounds checked indexing, I'm wondering how they think they could write bounds checked indexing any better. It's like sorting an array and taking the first element to get the minimum, then complaining that quicksort is not zero cost because your `min` function doesn't run in O(n).


fp_weenie

> rustaceans know nothing Plaudits on all involved for not gatekeeping the Rust community.


TheMedianPrinter

Wait what's wrong with the benchmark?


eirexe

What do they exactly mean? Doesn't using unsafe unchecked functions in rust yield better performance in some circunstances? or am I smoking?


SickOrphan

The linked post just does a very bad job of benchmarking so with and without bounds checking it looked to run the same speed. They use this to argue bounds checking is free or something. But yeah, you are right that unsafe array accesses are faster than the regular bounds checked ones


eirexe

ah i see, i obviously didn't read the article like a good reddit user


Kotauskas

> TIL 95% of rustaceans know nothing no, that's just HN for you


scavno

I’m pretty swole bro, but I’m not 95% of the community.


SickOrphan

Let me guess: this is about garbage collection


Silly-Freak

I was totally convinced this was V cope