Hacker News new | past | comments | ask | show | jobs | submit login
[dupe] What Every Programmer Should Know About Memory (2007) [pdf] (freebsd.org)
87 points by federicoponzi on June 23, 2017 | hide | past | favorite | 26 comments



Here's a good companion piece that focuses on CPU features rather than memory: "What's new in CPUs since the 80s and how does it affect programmers?"[0]

[0]: https://danluu.com/new-cpu-features/



A fascinating document, but I find it far-fetched that every programmer needs be intimately familiar with capacitor timing to use RAM efficiently, let alone write efficacious programs.

As languages without MMM become more popular, it's really up to the compiler authors (or at least a subset of them) to get all of these details right.


I agree that not every programmer needs to know the contents of this giant paper. It be useful for any programmer wanting to learn more about how memory and allocations affect performance and correctness.

Since there are so few things that every programmer actually needs, please enjoy these latency numbers that I think will benefit just about every programmer: https://gist.github.com/jboner/2841832


Think this way: Imagine is "What every scientist should know about relativity" and it point to the most complete book about it (which I don't know what is it).

Obviously is not about know every detail, but read the whole book will be more beneficial that read a small summary like: "This 10 weird tricks about relativity will make you popular!"


What is a language without (or with) DMA? The document's mention of DMA does not seem language related.


Sorry, I mean't manual memory management. It seems like I'm having some problems with DMA myself!


This kind of article title was always vacuous. It's essentially click bait. I don't think any of us have actually learned each thing that every article says that every programmer should know.


This is a 114 page paper that describes the extreme details of squeezing every ounce of performance out of memory.

While I agree every programmer does not need to know, calling it vacuous without reading is deeply insulting to such a useful document.

I read every page of it some years ago and will likely re-read it again soon as details fade.


He called the title vacuous. Big difference.


It is not important, but I would argue even that, at worst its dated. The success of this paper seems to be what kicked off the trend of "Everything about <blah> every programmer [needs|should] know".

Just like I wouldn't consider the "Goto's considered harmful" title to be vacuous despite the endless parade of copycats with "<Blah> considered harmful" articles and papers.


(slightly) OT:

The article is well known and the author Ulrich Drepper is also well known in the FOSS world for his work on the GNU C Library. [1]

So I was surprised to find that he did not have a small English language Wikipedia page, even though there were pages in German, French, Norwegian, Japanese and Persian.

Oh, "that can't be right - I'll create one!", I thought. (By translating one of the existing pages.)

But I could not! The page "is protected from creation" [2].

An archived deletion discussion from 2014 states "This article fails Wikipedia:Notability (people), Wikipedia:Verifiability, and Wikipedia:Biographies of living persons and should be deleted." ... etc.

Edit: s/Dropper/Drepper/

[1] https://en.wikipedia.org/wiki/GNU_C_Library

[2] https://en.wikipedia.org/wiki/Ulrich_Drepper

[3] https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletio...


That is bizzare. Is there any way to view historical justifications of this? Ulrich Drepper is undoubtedly worthy of a Wikipedia page.

I'm starting a draft page now - https://en.wikipedia.org/wiki/Draft:Ulrich_Drepper


>Is there any way to view historical justifications of this?

See my 3rd reference above from 2010:

https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletio...


I've been looking for information about Ulrich for these past few minutes trying to build a draft document and I'm starting to put together the reasons why Ulrich will not have a page soon...

Ulrich has accomplished so much as a programmer, more than nearly any programmer ever will. If we measured contributions objectively, he'd definitely be one of those "1% of programmers who produce 95% of software that is used by more than 1000 people". In fact, I just grepped for 'Ulrich Drepper' on my own personal computer and I've got pages-upon-pages of results (at least 2kloc) of bylines, commits, man pages and tiny thank you notes with only one recipient (Ulrich) deep in places you expect and then many you don't: the Android SDK, Coreutils, Wine project.

When you do a bit of research about him (of the variety Wikipedia would accept), there's a different story. There are no awards for Ulrich Drepper, there are no 'real' publications outside of open source that are describing what he does, there are no lively pieces of evidence that the world recognizes his contributions, there most certainly are no fanclubs.

What does emerge is a consistent message that the big players of free software wont tolerate him or his software (along with thousands of 'critiques' of his leadership style). Looking over this you see a pattern that emerges where an issue is brought up on a mailing list by people who are trying to help him or at the very least are neutral towards him and he cuts them down, insults them, belittles them for absolutely no reason whatsoever ("I have to let them know that they are dumb so they don't write software that hurts the world"). It's so comically obvious that he doesn't actually believe he's making "software" or "the world" any better while he's doing this.

I'm not sure why, but reading about Ulrich Drepper has put the broader world of software in perspective. I've never thought about the 'legitimacy' of Linus Torvald's (and others) management style. I have even been known to think that "asshole bosses get shit done". I had never seen what comes out for the projects that aren't Linux. The smaller & more mundane pieces of software whose petty tyrant isn't tolerated for long.

My initial feeling was that Ulrich Drepper deserves a Wikipedia page, but the evidence is that the deletionist might be right. Ulrich Drepper is not widely recognized because he has let his pride, his hubris and his attachment to criticism condemn him to a life of loneliness and anonymity with no indications that he wants either.


I agree with nearly all of that except the last paragraph:

>My initial feeling was that Ulrich Drepper deserves a Wikipedia page, but the evidence is that the deletionist might be right.

Should niceness/sociablity/etc be a criteria for notability and hence "deserving" a Wikipedia page?

I'd argue that it should not.

Linus Torvalds, Stephen Wolfram, Steve Jobs - none of them seem particularly nice - but all have achieved great things - and hence they are notable.

The difference from the case of Ulrich Drepper, is that those achievements are documented in a form that Wikipedia will accept as evidence for notability.


You can try to create one on infogalactic.com. I doubt they would object.


Infogalactic looks all free and easy now - but it could not remain that way if it got to anything like the scale of Wikipedia.

Without the "fascist" administrators, Wikipedia would be an absolute spam-fest of corporate drivel, conspiracy theory nutjobs ... etc.

My point is that my gut reaction was that Ulrich Drepper was notable enough to have a small Wikipedia page, but it turned out that it had been quite clearly decided that he was not.


> but it could not remain that way if it got to anything like the scale of Wikipedia.

I would encourage you to learn a bit more about it first. It will not be following wikipedia down that path.


My I ask you whether you are connected with Infogalactic in any way? I could not see any disclaimer on your post, but you seem remarkably well informed about them.

Ah yes - answered my own question - it seems likely that you are closely connected with Intergalactic. see this "Show HN: Infogalactic (infogalactic.com)" [1] that you submitted 252 days ago.

I did actually spend 10 minutes looking at the Infogalactic site before posting my reply.

The Introduction page [2] starts out all fine and dandy:

>Infogalactic does not share the highly centralized structure of Wikipedia or the ideological dogma of the Wikimedia Foundation. The primary requirements are for the information contributed to be true, relevant, and verifiable, rather than cited from a so-called “published reliable source”, since experience has proven how reliance upon the latter can be easily gamed by editors and administrators alike. There is no culture of notability, ideology, or deletionism at Infogalactic. The addition of perspective filters and two levels of Context and Opinion to every page means that the average editor's contribution is much less likely to be deleted for political reasons or fall victim to edit wars over controversial pages.

But then I read down to this bit:

>Infogalactic is a private corporation supported by donations and advertising revenue. ...

Sorry, but that doesn't work for me. I'd rather stick with the Wikimedia Foundation.

[1] https://news.ycombinator.com/item?id=12711029

[2] https://infogalactic.com/info/Infogalactic:Introduction


I made a single post almost a year ago and now I'm 'closely connected'? What a joke.

> I'd rather stick with the Wikimedia Foundation.

I don't care. I'm only aware of infogalactic because it's an alternative to wikipedia, which I sought out to begin with because of the very complaints you just made...

> "An archived deletion discussion from 2014 states "This article fails Wikipedia:Notability (people), Wikipedia:Verifiability, and Wikipedia:Biographies of living persons and should be deleted." ... etc."


> I made a single post almost a year ago and now I'm 'closely connected'? What a joke.

Show HNs are for posting your own projects, so of course the parent would assume a close connection from you posting one.

https://news.ycombinator.com/showhn.html : Show HN is a way to share something that you've made on Hacker News.


Is it? I've been posting here for years (under other names, not just this one) and I didn't know that. I guess I never noticed that people were posting up their own projects and not something they just thought was interesting. I'll keep that in mind for the future.


You wrote:

>I would encourage you to learn a bit more about it first.

When I'd already checked "them" out, and decided it wasn't for me.

Also, as @detaro points out, a Show HN is clearly documented as for your own work.

Furthermore, it turns out that you have multiple HN accounts - that comes across as scammy to me.


> Furthermore, it turns out that you have multiple HN accounts - that comes across as scammy to me.

None of them are active. I've quit the site more than once. I can't imagine why...


>None of them are active. I've quit the site more than once.

OK - fair enough on the multiple HN accounts.

Your posts do come across as pushing Infogalactic quite strongly though, which is why I looked at your profile for your past submissions, and found the Show HN.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: