Dr_Emann

Joined 9 years ago

Karma
121
Submissions
30
Member since
Jul 24
[ my public key: https://keybase.io/dr_emann; my proof: https://keybase.io/dr_emann/sigs/RVRspf4dNbPKM-bFDVrx0GzZHZLkP79O7Toa9538riU ]
View on Hacker News

Recent submissions

Comment · 1 month ago
Comment · 1 month ago
Comment · 2 months ago
It's a little unclear, but it's a live updating number, if you follow the directions, you'll see the second number decrease.
Comment · 4 months ago
I don't think so, "while vacant" is an infinite amount of time, if you look infinitely far into the future.
Comment · 5 months ago
"Participants got behind the wheel of a driving simulator equipped with everything you’d find in a real car – from the steering wheel to the pedals and dashboard. A large touchscreen, similar to those found in newer vehicles, allows for music to play and text messages to come through. Three oversized monitors provide 180 degrees of visual coverage to create a realistic, immersive driving environment."

Seems pretty clearly a simulator, they use that word several times.

Comment · 6 months ago
To be even fair-er, it wasn't actually memory unsafety, it was "just" unsoundness, there was a type, that IF you gave it an io reader implementation that was weird, that implementation could see uninit data, or expose uninit data elsewhere, but the only readers actually used were well behaved readers.
Comment · 1 year ago
Thats kinda the problem, there are concepts in rust that don't have equivalents in other common languages. In this case, rust's type system models data-race-safety: it prevents data races at compile time in a way unlike what you can do in c or c++. It will prevent getting mutable access (with a compile time error) to a value across threads unless that access is syncronized (atomics, locks, etc)
Comment · 1 year ago
Rust has access control. Fields are private by default.
Comment · 1 year ago
Wow the comments are.. Bad. Not all single instruction operations are the same.
Comment · 1 year ago
Comment · 2 years ago
Hi, I think even the remaining benchmark isn't showing what you're trying to show:

https://rust.godbolt.org/z/r9rP6xohb

Rust realizes the vector is never used, and so never does any allocation, or recursion, it just turns into a loop to count up to 999_999_999.

And some back of the napkin math says there's no way either benchmark is actually allocating anything. Even if malloc took 1 nanosecond (it _doesn't_), 999_999_999 nanoseconds is 0.999999999 seconds.

It _is_ somewhat surprising that rust doesn't realize the loop can be completely optimized away, like it does without the unused Vec, but this benchmark still isn't showing what you're trying to show.

Comment · 2 years ago
Rust optimizes factorial to be iterative, not using recursion (tail or otherwise) at all, and it turns `factorial(15, 1)` into `1307674368000`: https://rust.godbolt.org/z/bGrWfYKrP. As has been pointed out a few times, you're benchmarking `criterion::black_box` vs `benchmark.keep` (try the newer `std::hint::black_box`, which is built into the compiler and should have lower overhead)

And no: in the example with `&String` and `usize`, the stack isn't growing: https://rust.godbolt.org/z/6zW6WfGE7

Comment · 4 years ago
Honestly feels like a very, very different use case from utf8-ish strings, at a quick read?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton