Remove std
article thumbnail

Exploring GNU extensions in the Linux kernel

Hacker News

In 2022, it moved from GCC/Clang -std=gnu89 to -std=gnu11. The Linux kernel is written in C, but it also leverages extensions provided by GCC. This article explores my notes on how these GNU extension

124
124
article thumbnail

Parsing integers quickly with AVX-512

Hacker News

If I give a programmer a string such as 9223372036854775808 and I ask them to convert it to an integer, they might do the following in C++: std::string s =. uint64_t val; auto [ptr, ec] = std::from_chars(s.data(), s.data() + s.size(), val); if (ec !=

176
176
professionals

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

article thumbnail

Condvars and atomics do not mix

Hacker News

When using std::condition_variable, there’s an easy to remember rule: all variables accessed in wait predicate must be changed under a mutex. However, this is easy to accidentally violate by throwing atomics in the mix.

179
179
article thumbnail

Rust std fs slower than Python

Hacker News

An infrastructure engineer, focused on distributed storage system

Python 140
article thumbnail

std::source_location Is Broken

Hacker News

Comments (..)

117
117
article thumbnail

C++ Exit-Time Destructors

Hacker News

In ISO C++ standards, [basic.start.term] specifies that: Constructed objects ([dcl.init]) with static storage duration are destroyed and functions registered with std::atexit are called as part of a

123
123
article thumbnail

Bootstrap Your Own Variance

Machine Learning Research at Apple

We find that the learned predictive std of BYOV vs. a supervised BBB model is well captured by a Gaussian distribution, providing preliminary evidence that the learned parameter…