Live data from Hacker News

Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

debasishg.github.io

11–20 of 26 posts

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#11
post #8

Earlier quoted context omitted.

> AI polished it [...] Compared to purely human writing [...] reads better than you'd expect I'd hard disagree here. Not when you're bombarded with this every single day. First, you start to be able to reliable recognize this writing style. Then, every time you see it you start getting the urge to pick up your chair and smash your monitor with it. There's also the issue of not being able to distinguish "AI slop" from…

I can recognize it too. For example, there's that particular archetype where the writing summarizes things by leading with a block quote. But I don't think that's a bad thing. To be honest, I actually think some AI style of speaking is effective for conveying information. People can have different opinions, of course. I write most things with my own hands. But if I feel like the AI's suggestion is better than what I…

> In other words, it's the most average, the most flat. [..] And when you think about it, the AI's training data comes from the broadest consumer distribution. It spits out that kind of data because it learned that most people preferred it.

That's not what it is! The heavy reinforcement learning that the models go through makes their writing the farthest thing possible from the "most average, flat" distribution. The distribution actually becomes very sharp due to this, unlike any writing it has seen in 99.99% of its training data! (The heavier the RL is, the more same-y the output becomes.) This is why every AI-written piece feels the same, and why people can learn to easily tell that something was written by an AI. And frontier labs make this problem even worse by how they sample[1] their logits.

[1]: https://gist.github.com/Hellisotherpeople/71ba712f9f899adcb0...

> But when I read a technical article, the most important thing, unlike a novel, isn't the prose style.

Exactly! Which is why I think there's no need to "enhance" it with AI.

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#12
post #3

But I don't really get what the problem is with using AI for editing. This article clearly has a sense of what it's trying to say. A human wrote the first draft, and then AI polished it. It's a method I use a lot myself. So it's a human plus AI hybrid piece, and honestly, I don't see anything particularly wrong with the content. Stuff like isolating the hot core and packing the cold fields, that's just common knowled…

Unless you're writing for an extremely formal audience, I imagine most of us would prefer the unpolished version that actually sounds human.

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#13
post #8

Earlier quoted context omitted.

I can recognize it too. For example, there's that particular archetype where the writing summarizes things by leading with a block quote. But I don't think that's a bad thing. To be honest, I actually think some AI style of speaking is effective for conveying information. People can have different opinions, of course. I write most things with my own hands. But if I feel like the AI's suggestion is better than what I…

> In other words, it's the most average, the most flat. [..] And when you think about it, the AI's training data comes from the broadest consumer distribution. It spits out that kind of data because it learned that most people preferred it. That's not what it is! The heavy reinforcement learning that the models go through makes their writing the farthest thing possible from the "most average, flat" distribution. The…

Thank you for pointing out something I didn't know. That said, I do think there are some issues with it, just as you mentioned.

I think it's a simulacrum and simulation problem. I recently had a chance to teach some students, and I noticed their writing was starting to resemble AI generated text. The reason was that the AI was guiding their learning, and the students ended up picking up the AI's way of speaking.

Honestly, you can't rule out that kind of issue, and the homogenization of voice is definitely a valid concern too.

Opinions on what counts as "improvement" will vary from person to person, but I do think the problems you've raised can't be completely dismissed.

Thanks for the insight, and I'll take the time to read through the links you shared. Have a good day.

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#14
I don't get it. If the ring structure has 4 field (excluding the cold ones), and all 4 have alignment constraints, doesn't it define 4 zones in 4 cache lines, and not 2?

I expected head and cached_tail, for example, to share the same line, but since they are both 128-byte aligned, they end up in separate lines. Granted, both lines are dedicated to only one side of the producer-consumer pipe, but we're wasting cache lines for nothing.

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#15
post #3

But I don't really get what the problem is with using AI for editing. This article clearly has a sense of what it's trying to say. A human wrote the first draft, and then AI polished it. It's a method I use a lot myself. So it's a human plus AI hybrid piece, and honestly, I don't see anything particularly wrong with the content. Stuff like isolating the hot core and packing the cold fields, that's just common knowled…

> AI polished it [...] Compared to purely human writing [...] reads better than you'd expect I'd hard disagree here. Not when you're bombarded with this every single day. First, you start to be able to reliable recognize this writing style. Then, every time you see it you start getting the urge to pick up your chair and smash your monitor with it. There's also the issue of not being able to distinguish "AI slop" from…

[deleted]

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#16
post #3

But I don't really get what the problem is with using AI for editing. This article clearly has a sense of what it's trying to say. A human wrote the first draft, and then AI polished it. It's a method I use a lot myself. So it's a human plus AI hybrid piece, and honestly, I don't see anything particularly wrong with the content. Stuff like isolating the hot core and packing the cold fields, that's just common knowled…

Didnt read but i sent this to my llm and it checks out

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#17
post #8

Earlier quoted context omitted.

> AI polished it [...] Compared to purely human writing [...] reads better than you'd expect I'd hard disagree here. Not when you're bombarded with this every single day. First, you start to be able to reliable recognize this writing style. Then, every time you see it you start getting the urge to pick up your chair and smash your monitor with it. There's also the issue of not being able to distinguish "AI slop" from…

I can recognize it too. For example, there's that particular archetype where the writing summarizes things by leading with a block quote. But I don't think that's a bad thing. To be honest, I actually think some AI style of speaking is effective for conveying information. People can have different opinions, of course. I write most things with my own hands. But if I feel like the AI's suggestion is better than what I…

For me the core of the anti AI argument has nothing to do with form and style - although that is how AI writing can often be identified.

Its much simpler - if you cant be bothered to write it, I cant be bothered to read it. There is no communication happening otherwise. I can enter a prompt on my own.

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#18
post #10
post #7

the best way to prevent false sharing is by making it so that no two threads are in a position to access the same data structure which may be inconsistent because it is being written to. embrace message passing.

No. False sharing can happen even with only 1 writer.

GP's claim does not require two writers for false sharing. It requires two threads with either read or write access, at least of which is writing

The valid criticism is that message passing also fits that definition. But assuming good faith, the implied argument seems to be "use an off-the-shelf message passing solution that already solves all this, rather than rolling your application-specific data sharing"

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#19
post #7

the best way to prevent false sharing is by making it so that no two threads are in a position to access the same data structure which may be inconsistent because it is being written to. embrace message passing.

Message passing is definitely a good solution in many cases, but shared data structures are often significantly faster. Even Go doesn't restrict you to message passing, even though it is very focused on channels.

Re: Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

#20
post #3

But I don't really get what the problem is with using AI for editing. This article clearly has a sense of what it's trying to say. A human wrote the first draft, and then AI polished it. It's a method I use a lot myself. So it's a human plus AI hybrid piece, and honestly, I don't see anything particularly wrong with the content. Stuff like isolating the hot core and packing the cold fields, that's just common knowled…

It's tedious to see the same rhetorical style everywhere. It's cliché overload. Basically 6 7 in prose form.
Post reply on HN