Top all-time · #4146
cellperformance.beyond3d.com
Personal blog · cellperformance.beyond3d.comprogrammingsystems
cellperformance.beyond3d.com is a personal blog at cellperformance.beyond3d.com about programming and systems. Since 2009, 19 different Hacker News readers have linked it 29 times, most often “Three Big Lies (2008)”. No feed was found, so read it on the site itself.
Too few sampled comments (12) to say how often HN recommends it.?
Why HN links it
HN readers link Mike Acton's cellperformance.beyond3d.com articles on data-oriented design, low-level C/C++ performance, strict aliasing and compiler behaviour, usually as background or further reading.
Summarised by Claude from a sample of 12 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Three Big Lies (2008)4 people · 8 mentions · first linked 2010-12-03
- Understanding strict aliasing4 people · 4 mentions · first linked 2010-12-30
- Understanding Strict Aliasing (2006)4 people · 4 mentions · first linked 2018-11-12
- Roundup: Recent sketches on concurrency, data design and performance4 people · 4 mentions · first linked 2009-09-04
- Three Big Lies3 people · 3 mentions · first linked 2020-08-13
- Demystifying the Restrict Keyword (2006)2 people · 2 mentions · first linked 2021-04-21
What Hacker News says?
Rule 5 (data dominates) is exactly the same as lie 3 (code is more important than data) of Mike Acton's Three Big Lies ( https://cellperformance.beyond3d.com/articles/2008/03/three-... ). Rob Pike's rule 3 (don't use fancy algorithms) is closely related to Mike Acton's lie 1 (software is a platform) as well. A part of me wonders if Mike was influenced by Rob Pike's rules directly or indirectly. It's also something t…
Comment linking /articles/2008/03/three-big-lies.html
on “Rob Pike's Rules of Programming (1989)”Submitted Three Big Lies (2008) as a story · 35 points
HN discussion> Therefore the existence of the q pointer does not tell the compiler what type actually exists at memory address p/q. Is it invalid to construct q from p? I wouldn't think so as long as they are in the same allocation, but maybe I'm forgetting a rule. But then the question is, how would you construct an allocation where both q[-1] and *p are guaranteed to be valid objects of their respective types, using standard C…
Comment linking /articles/2006/06/understanding-strict-aliasing.html
on “Why does calloc exist? (2016)”Submitted Three Big Lies (software/game development) as a story · 5 points
HN discussionNot sure if you're familiar with Mike Acton (as mentioned in the article). One of his key points of focus is data-oriented design, and that when designing software, ignoring the architectural realities of the hardware is ignoring one of your responsibilities as an engineer to deliver performant software. Now, it's possible to argue that writing performant software is not important. The prevailing modern sentiment de…
Comment linking /articles/2008/03/three-big-lies.html
on “Expectations of professional software engineers”Submitted Roundup: Recent sketches on concurrency, data design and performance as a story · 3 points
HN discussionI actually use macros along the lines of: #define LOAD(TYP, ptr) (*((TYP *)memcpy((TYP[1]){ }, ptr, sizeof(TYP)))) #define REINTERPRET(AS_TYP, FROM_TYP, val) LOAD(AS_TYP, (FROM_TYP[1]){ val }) In practice (that I've found, with GCC), the memcpy and single-use temporaries get optimized away entirely. In strict C99, writing one member of a union and then reading a different member of the same union is undefined in the…
Comment linking /articles/2006/06/understanding-strict-aliasing.html
on “Fast Inverse Square Root”Submitted Diving Down the Concurrency Rabbit Hole [pdf] as a story · 2 points
HN discussionIf uint8_t exists, then I believe the following ought to be true: 1. CHAR_BITS == 8, and 2. the compiler is required to make uint8_t an alias of unsigned char. Point 2 is there so that you can cast to uint8_t safely, which some cryptographic code tends to rely on. If uint8_t is just any integer type, there's no safe cast to uint8_t due to strict aliasing rules[1]. That's what I want to fix. CHAR_BITS == 8 if uint8_t…
Comment linking /articles/2006/06/understanding-strict-aliasing.html
on “C2x: the next real revision of the C standard”Submitted Three Big Lies (2008) as a story · 2 points
HN discussionStrict aliasing can worked around by casting through a union, essentially introducing a new type which can alias any of its component types. Mike Acton has a good description of it with lots of assembly examples here: http://cellperformance.beyond3d.com/articles/2006/06/underst...
Comment linking /articles/2006/06/understanding-strict-aliasing.html
on “A bug story: data alignment on x86”Submitted Three Big Lies (2008) as a story · 2 points
HN discussionOne should never loose to the complier, after all you can see it's output and it can't see yours. Also, the programmer can "cheat" by doing things the compiler would consider invalid but are known to be ok given the larger context of the application. The restrict keyword in c gives an example of how one can optimize code by knowing the larger context. https://cellperformance.beyond3d.com/articles/2006/05/demyst... T…
Comment linking /articles/2006/05/demystifying-the-restrict-keyword.html
on “How many x86 instructions are there? (2016)”Submitted Understanding Strict Aliasing (2006) as a story · 1 points
HN discussionIf you're interested in writing concurrent code worth running, Mike Acton has a nice introduction: http://cellperformance.beyond3d.com/articles/2009/08/roundup...
Comment linking /articles/2009/08/roundup-recent-sketches-on-concurrency-data-design-and-performance.html
on “Semaphores are surprisingly versatile”Submitted Three Big Lies (2008) as a story · 1 points
HN discussionI think this is pretty well stated: There is no value in code being some kind of model or map of an imaginary world. I don't know why this one is so compelling for some programmers, but it is extremely popular. If there's a rocket in the game, rest assured that there is a "Rocket" class (Assuming the code is C++) which contains data for exactly one rocket and does rockety stuff. With no regard at all for what data t…
Comment linking /articles/2008/03/three-big-lies.html
on “Things to hate about OOP”Submitted Demystifying the Restrict Keyword (2006) as a story · 1 points
HN discussion> he needs to accommodate that Clearly he doesn't. He just disabled harmful features and called it a day. Stuff like strict aliasing and undefined signed integer overflow apparently do nothing but serve as an excuse for the optimizer to screw up perfectly reasonable code. https://cellperformance.beyond3d.com/articles/2006/06/unders... https://stackoverflow.com/q/2958633/512904 Looks like this is a pretty good approa…
Comment linking /articles/2006/06/understanding-strict-aliasing.html
on “Arena Allocator Tips and Tricks”Submitted Three Big Lies as a story · 1 points
HN discussionUnfortunately, not much. The first page of google hits are all pretty good, but short. Also, Mike Acton of Insomniac has ranted about it a couple of times. http://cellperformance.beyond3d.com/articles/2006/04/perform... http://cellperformance.beyond3d.com/articles/2009/08/roundup... There are a lot of component-design links here: http://stackoverflow.com/questions/1901251/component-based-g... I don't know if any of…
Comment linking /articles/2009/08/roundup-recent-sketches-on-concurrency-data-design-and-performance.html
on “Ask HN: They say no one knows all C++ so what parts do Game Devs need to know?”Submitted Understanding strict aliasing (2006) as a story · 1 points
HN discussionSee also: http://cellperformance.beyond3d.com/articles/2006/05/demysti...
Comment linking /articles/2006/05/demystifying-the-restrict-keyword.html
on “Fun C Micro-optimizations: restrict”Submitted Three Big Lies (2008) as a story · 1 points
HN discussionSubmitted Three Big Lies (2008) as a story · 1 points
HN discussionSubmitted Three Big Lies as a story · 1 points
HN discussionSubmitted Understanding strict aliasing as a story · 1 points
HN discussionSubmitted Sketches on concurrency, data design and performance. as a story · 1 points
HN discussion