Rendered at 20:20:15 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
teo_zero 14 hours ago [-]
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.
guardbandclip 7 hours ago [-]
It's LLM slop, what do you expect?
kouteiheika 18 hours ago [-]
> the mechanics that make zoning real: why #[repr(C)] is load-bearing, why the magic number is often 128 and not 64, and why adding prefetch hints can make things worse.
> The honest rule
Sigh... yet another Claude written article, and (unless I'm blind) it doesn't seem to be disclosed anywhere.
Normally I'm not the one to complain, but it's really tedious to see this writing style pretty much everywhere nowadays, and the more you see it the more you start to find it unbearable to read.
jauntywundrkind 15 hours ago [-]
Side note, nice seeing Debasish Ghosh working in Rust! Yay. As is tradition in Rust world, yes they have their own (rather extensive) repo of ring buffers. https://github.com/debasishg/ringmpsc-rs
teravor 16 hours ago [-]
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.
boricj 11 hours ago [-]
Some of us work with industrial SoCs, with puny in-order Cortex-A7 cores and tiny L1/L2 caches. Sometimes, you really need to optimize for the hardware and micro-architecture you have in order to hit the performance goals required and message passing isn't always the answer.
nh2 15 hours ago [-]
No. False sharing can happen even with only 1 writer.
wongarsu 11 hours ago [-]
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"
IshKebab 11 hours ago [-]
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.
jdw64 17 hours ago [-]
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 knowledge you pick up.
Compared to purely human writing, it's actually safer and reads better than you'd expect, so I find it hard to understand why people are complaining about this.
If anything, I think tech blogs especially need to check whether their own thoughts line up with the knowledge of an LLM, which is basically a talking encyclopedia. But it seems like people don't really see it that way.
swatcoder 16 hours ago [-]
We rely on subtle distinction in writing style to distinguish sources from each other and to read important cues into their communication intent, the same as with vocalized speech.
Scrubbing that away from writing with AI has the same effect as would running everyone's speech through an anonymizer.
Some people may be blind to that sort of thing entirely, much like some people can't recognize faces, but for most people it just creates a sense of noise and discomfort when everything everywhere is written in the same style. And that impression is only made worse when that increasingly uniquitous anonymized style is so painfully average and repetitive.
If there was a tool that let you edit select characteristics of your writing while preserving your voice, the way a professional editor might help a professional writer, that might be amazing for helping people communicate better and more easily. But that's not this. This is loud, articulate noise.
jdw64 16 hours ago [-]
think there's a difference in perspective here. There are a few things I see differently.
I'd probably hate it too if AI generated writing started showing up in novels. But when it comes to things like wikis or encyclopedias where the whole point is conveying information, I find myself wondering, is it really that bad?
So rather than saying "it's bad for all writing," I kind of feel like as long as the facts get across in informational writing, that's good enough.
Because there were a few techniques in there that I didn't know about. I copied them down and saved them. So in other words, I gained new knowledge.
On the other hand, if it had been a novel, the writing style itself would have been a problem, so I'd think it was bad. But for this kind of informational writing, I don't think it's a bad thing at all.
kouteiheika 16 hours ago [-]
> 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 "human written + AI polished". Am I being led to read some lazy, low quality AI slop? Or is this actually something that a real human spent time and effort to produce? Both look the same, so how can you tell the difference?
Personally I find it somewhat offensive to use AI in human-to-human communication. If you expect another person to read it then please write it yourself! It's not going to be as "polished" as-if AI would have written it, but that's okay! If you insist on using AI then, at most, just get it to review your writing and apply its findings wherever it makes sense.
14 hours ago [-]
jdw64 15 hours ago [-]
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 wrote, I'll improve my writing. In fact, I did exactly that with a few pieces recently.
I respect that some people prefer things unpolished, and I respect their way of thinking. But I don't think that flat, AI assisted writing is bad for information delivery.
I believe there are many different kinds of writing. In novels or reportage, I think AI writing is bad. The style itself is part of the author's signature, after all. But on the flip side, I'm skeptical about whether someone's personality really needs to come through in a wiki or an encyclopedia.
The core of the anti AI argument right now is ultimately about form and style. But that style is something the model was trained on, based on datasets that people, on average, preferred. In other words, it's the most average, the most flat. It's inorganic, but it's the median.
When we define readers or consumers, there's always the question of where to draw the line, what segment to set. 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.
Of course, even in informational writing, things like "has this person actually been through this?" or "is this exaggerated?" do matter, and that feeling is important. But when I read a technical article, the most important thing, unlike a novel, isn't the prose style. It's whether it hands me the technique or not.
So while I respect your opinion, I don't think it aligns with my values.
kouteiheika 15 hours ago [-]
> 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.
> 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.
jdw64 15 hours ago [-]
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.
MattPalmer1086 12 hours ago [-]
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.
jdw64 10 hours ago [-]
There are some points where I disagree with that argument. It comes down to where you draw the line on human effort.
You're basically saying that hammering a nail with a regular hammer and hammering it with a power tool aren't the same act. Let me put it this way. I don't like fully AI generated writing either. But if I read something and can see traces that a human wrote the first draft and then refined it, then I don't really care if AI was involved.
It's just a question of where the effort is placed. And the real key is whether the right "keywords" are there or not. If you've actually used AI, you'll know that it's a layering tool. The output varies a lot depending on the layers of input you give it. No matter how much I prompt it about functional programming, I'm not going to get results that are deep or particularly good. This piece seems like someone put a fair amount of care into it, but I guess you see it differently.
Honestly, if the people who taught me or explained things to me had written at this level, I might agree with you. But most of the professors and people I've encountered didn't write this well this easily.
MattPalmer1086 8 hours ago [-]
I have used AI fairly extensively to help me summarise info, or to explore topics I'm not familar with. But I don't use AI text directly in anything I write for consumption by other humans.
Aside from the fact you automatically reduce your audience, as there's lots of people who will be immediately turned off, I want to speak, not have a machine speak for me.
To take your hammer analogy, i will always use the hammer to hit the nail, but I might use a machine to help find a good place for the nail!
jdw64 7 hours ago [-]
You have a point. I think it's just a matter of how we get information. It's a difference in values, and we're bound to see things differently. That said, this is how I think, and I don't plan to change my mind. You probably also think you're right, and given your situation, you probably are.
I respect your perspective. Have a good day, and I hope you understand that I didn't write my comment with any intention of attacking you.
MattPalmer1086 4 hours ago [-]
Not at all - we dont have to agree but i enjoyed our discussion.
throwaway27448 15 hours ago [-]
Unless you're writing for an extremely formal audience, I imagine most of us would prefer the unpolished version that actually sounds human.
etdznots 13 hours ago [-]
Didnt read but i sent this to my llm and it checks out
IshKebab 11 hours ago [-]
It's tedious to see the same rhetorical style everywhere. It's cliché overload. Basically 6 7 in prose form.
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.
> The honest rule
Sigh... yet another Claude written article, and (unless I'm blind) it doesn't seem to be disclosed anywhere.
Normally I'm not the one to complain, but it's really tedious to see this writing style pretty much everywhere nowadays, and the more you see it the more you start to find it unbearable to read.
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"
Stuff like isolating the hot core and packing the cold fields, that's just common knowledge you pick up.
Compared to purely human writing, it's actually safer and reads better than you'd expect, so I find it hard to understand why people are complaining about this.
If anything, I think tech blogs especially need to check whether their own thoughts line up with the knowledge of an LLM, which is basically a talking encyclopedia. But it seems like people don't really see it that way.
Scrubbing that away from writing with AI has the same effect as would running everyone's speech through an anonymizer.
Some people may be blind to that sort of thing entirely, much like some people can't recognize faces, but for most people it just creates a sense of noise and discomfort when everything everywhere is written in the same style. And that impression is only made worse when that increasingly uniquitous anonymized style is so painfully average and repetitive.
If there was a tool that let you edit select characteristics of your writing while preserving your voice, the way a professional editor might help a professional writer, that might be amazing for helping people communicate better and more easily. But that's not this. This is loud, articulate noise.
I'd probably hate it too if AI generated writing started showing up in novels. But when it comes to things like wikis or encyclopedias where the whole point is conveying information, I find myself wondering, is it really that bad?
So rather than saying "it's bad for all writing," I kind of feel like as long as the facts get across in informational writing, that's good enough.
Because there were a few techniques in there that I didn't know about. I copied them down and saved them. So in other words, I gained new knowledge.
On the other hand, if it had been a novel, the writing style itself would have been a problem, so I'd think it was bad. But for this kind of informational writing, I don't think it's a bad thing at all.
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 "human written + AI polished". Am I being led to read some lazy, low quality AI slop? Or is this actually something that a real human spent time and effort to produce? Both look the same, so how can you tell the difference?
Personally I find it somewhat offensive to use AI in human-to-human communication. If you expect another person to read it then please write it yourself! It's not going to be as "polished" as-if AI would have written it, but that's okay! If you insist on using AI then, at most, just get it to review your writing and apply its findings wherever it makes sense.
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 wrote, I'll improve my writing. In fact, I did exactly that with a few pieces recently.
I respect that some people prefer things unpolished, and I respect their way of thinking. But I don't think that flat, AI assisted writing is bad for information delivery.
I believe there are many different kinds of writing. In novels or reportage, I think AI writing is bad. The style itself is part of the author's signature, after all. But on the flip side, I'm skeptical about whether someone's personality really needs to come through in a wiki or an encyclopedia.
The core of the anti AI argument right now is ultimately about form and style. But that style is something the model was trained on, based on datasets that people, on average, preferred. In other words, it's the most average, the most flat. It's inorganic, but it's the median.
When we define readers or consumers, there's always the question of where to draw the line, what segment to set. 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.
Of course, even in informational writing, things like "has this person actually been through this?" or "is this exaggerated?" do matter, and that feeling is important. But when I read a technical article, the most important thing, unlike a novel, isn't the prose style. It's whether it hands me the technique or not.
So while I respect your opinion, I don't think it aligns with my values.
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.
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.
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.
You're basically saying that hammering a nail with a regular hammer and hammering it with a power tool aren't the same act. Let me put it this way. I don't like fully AI generated writing either. But if I read something and can see traces that a human wrote the first draft and then refined it, then I don't really care if AI was involved.
It's just a question of where the effort is placed. And the real key is whether the right "keywords" are there or not. If you've actually used AI, you'll know that it's a layering tool. The output varies a lot depending on the layers of input you give it. No matter how much I prompt it about functional programming, I'm not going to get results that are deep or particularly good. This piece seems like someone put a fair amount of care into it, but I guess you see it differently.
Honestly, if the people who taught me or explained things to me had written at this level, I might agree with you. But most of the professors and people I've encountered didn't write this well this easily.
Aside from the fact you automatically reduce your audience, as there's lots of people who will be immediately turned off, I want to speak, not have a machine speak for me.
To take your hammer analogy, i will always use the hammer to hit the nail, but I might use a machine to help find a good place for the nail!
I respect your perspective. Have a good day, and I hope you understand that I didn't write my comment with any intention of attacking you.