Topics /

Systems & Performance

The most popular blog posts about systems & performance on Hacker News. 358 posts.

2021
31

Dissecting the Apple M1 GPU, Part III

After a few weeks of investigating the Apple M1 GPU in January, I was able to draw a triangle with my own open source code . Although I began dissecting the instruction set, the shaders there were specified as machine code. A real graphics driver needs a compiler from high-level shading languages (GLSL or Metal) to a…

37

Leaky Abstractions

In the late 1990s, the Windows Shell and Internet Explorer teams introduced a bunch of brilliant and intricate designs that allowed extension of the shell and the browser to handle scenarios beyond…

39

60x speed-up of Linux “perf”

The tool is great, but it uses perf to record and analyze profile data, and perf on Debian has a performance problem : when not linked against libbfd , it shells out to addr2line for every address it needs to look up. Thousands and thousands and thousands of incredibly short-lived processes.

52

Dissecting the Apple M1 GPU, Part IV

After beginning a compiler for the Apple M1 GPU , the next step is to develop a graphics driver exercising the compiler. Since the last post two weeks ago, I’ve begun a Gallium driver for the M1, implementing much of the OpenGL 2.1 and ES 2.0 specifications. With the compiler and driver together, we’re now able to run…

55

Memory access on the Apple M1 processor

When a program is mostly just accessing memory randomly, a standard cost model is to count the number of distinct random accesses. The general idea is that memory access is much slower than most other computational tasks. Furthermore, the cost model can be extended to count "nearby" memory accesses as free. That is…

60

The compiler will optimize that away

A lot of programmers believe that compilers are magic black boxes in which you put your messy code in and get a nice optimized binary out. The hallway philosophers will often start a debate on which language features or compiler flags to use in order to capture the full power of the compiler’s magic. If you have ever…