Miguel Young de la Sota

mcyoung.xyz · Personal blog · on HN since 2021

Miguel Young de la Sota writes in-depth technical posts on Rust, Go, C++, LLVM IR, linkers, and compiler internals.

What HN saysHN commenters call it a fantastic source of information. They recommend its posts on linker scripts, LLVM IR, move constructors in Rust, and a Go protobuf parser.
37HN people shared it
13linked it in comments
64stories submitted
1.8Kstory points
7 months agolast shared
2021people per year2026

Most-shared posts

  1. 1
    Move Constructors in Rust: Is it possible?
    6 people · 10 points · first shared 2021 · 1 comments on HN
  2. 2
    Go's Weird Little Iterators
    5 people · 19 points · first shared 2024 · discussion on HN
  3. 3
    A Gentle Introduction to LLVM IR
    5 people · 6 points · first shared 2023 · discussion on HN
  4. 4
    I Wrote a String Type
    5 people · 2 points · first shared 2023 · discussion on HN
  5. 5
    Why SSA?
    4 people · 244 points · first shared 2025 · 103 comments on HN
  6. 6
  7. 7
    C++ Library
    4 people · 52 points · first shared 2025 · 1 comments on HN
  8. 8
    Things You Never Wanted to Know About Go Interfaces
    4 people · 10 points · first shared 2024 · discussion on HN
  9. 9
    The Art of Formatting Code
    4 people · 8 points · first shared 2025 · discussion on HN
  10. 10
    Designing a SIMD Algorithm from Scratch
    4 people · 6 points · first shared 2023 · discussion on HN
  11. 11
    The Rust calling convention we deserve
    3 people · 300 points · first shared 2024 · 137 comments on HN
  12. 12
    Parsing Protobuf like never before
    3 people · 248 points · first shared 2025 · 93 comments on HN
  13. 13
    What's //Go:Nosplit For?
    3 people · 9 points · first shared 2025 · discussion on HN
  14. 14
    Single Abstract Method Traits
    3 people · 4 points · first shared 2023 · discussion on HN
  15. 15
    Cheating the Reaper in Go
    2 people · 188 points · first shared 2025 · 32 comments on HN

What HN people wrote when they linked it

aktau · 2025-12-11
(I agree with other commenters' assessment about the importance of the authors complaints, and recommend others checkout the Go memory regions proposal.) For those interested, here's an article where Miguel Young implements a Go arena: https://mcyoung.xyz/2025/04/21/go-arenas/. I couldn't find references to Go's own experimental arena API in this article. Which is a shame since it'd be if this knowledgeable author traded them off. IIUC, Miguels version and the Go experimental version do have some important differences even apart from the API. IIRC, the Go experimental version doesn't avoid garbage collection. It's main performance benefit is that the Go runtimes' view on allocated memory is decreased as soon as `arena.Free` is called. This delays triggering the garbage collector (meaning it will run less frequently, saving cycles).
jkelleyrtp · 2025-04-15
The author's blog is a FANTASTIC source of information. I recommend checking out some of their other posts: - https://mcyoung.xyz/2021/06/01/linker-script/ - https://mcyoung.xyz/2023/08/09/yarns/ - https://mcyoung.xyz/2023/08/01/llvm-ir/
parkmycar · 2024-08-24
I do, mcyoung wrote a great blogpost[1] about it! Good idea, I’m AFK at the moment but will add it to the ‘Similar Crates’ section once I’m back [1] https://mcyoung.xyz/2023/08/09/yarns/
aw1621107 · 2024-01-20
A follow-up post titled "Move Constructors Revisited" was posted some months later [0]. It covers some issues with the original design and how those may be addressed. [0]: https://mcyoung.xyz/2021/12/19/move-ctors-2/
sa46 · 2026-04-05
A new Go protobuf parser [1] made the rounds here eight months ago [2] with a specialized VM that outperforms the default generated protobuf code by 3x. [1]: https://mcyoung.xyz/2025/07/16/hyperpb/ [2]: https://news.ycombinator.com/item?id=44591605
f1shy · 2025-11-25
IMHO absolutely. The basics of lexer and parser are still there. Some of the optimizations are also relevant. You just cannot expect to read the book and be able to write GCC or LLVM from scratch(1). For learning deeper about other advanced topics there is: https://www.cs.cornell.edu/courses/cs6120/2025fa/ and https://mcyoung.xyz/2025/10/21/ssa-1/ So maybe writing a compiler with exactly one FE (for a simple language) and one BE (for a simple architecture), with say 80% of the optimizations could be a doable project. (1) We should define what we mean by that, because there are thousands of front-ends and back-ends.
mzs · 2024-12-09
links to his useful blogpost: A Gentle Introduction to LLVM IR https://mcyoung.xyz/2023/08/01/llvm-ir/
eslaught · 2024-08-25
I think the byteyarn library mentioned elsewhere in this thread meets your requirements: https://mcyoung.xyz/2023/08/09/yarns/
conaclos · 2024-08-24
Readers who like this article may also like a more recent one [0]. It designs a compact string with extra capabilities. The crate was released under the name byteyarn [1] [0] https://mcyoung.xyz/2023/08/09/yarns/ [1] https://docs.rs/byteyarn/latest/byteyarn/
ashleyn · 2024-07-13
Knew it'd be SIMD. Such an underrated feature of modern CPUs. Hopefully with cross-platform SIMD in Rust and Golang, it'll be more commonly used. Thinking parallel gets you enormous speed benefits for any number of arbitrary algorithms: https://mcyoung.xyz/2023/11/27/simd-base64/
zozbot234 · 2021-05-15
> If you were to use a pointer to a field, you'd need to correct that pointer during copies and moves. The "transfer" crate allows for this, though not in a way that's directly compatible with C++ move. (The latter has been discussed somewhat in https://mcyoung.xyz/2021/04/26/move-ctors/ but that's only a first look at the problem area, not aiming for 100% accuracy just yet.)
mananaysiempre · 2026-04-05
> It doesn't make sense to me that an embedded VM/interpreter could ever outperform direct code. You're adding a layer of abstraction and indirection, so how is it possible that a more indirect solution can have better performance? It is funny, but (like I’ve already mentioned[1] a few months ago) for serialization(-adjacent) formats in particular the preferential position of bytecode interpreters has been rediscovered again and again. The earliest example I know about is Microsoft’s MIDL, which started off generating C code for NDR un/marshalling but very soon (ca. 1995) switched to bytecode programs (which Microsoft for some reason called “format strings”; these days there’s also typelib marshalling and WinRT metadata-driven marshalling, the latter completely undocumented, but both data-driven). Bellard’s nonfree ffasn1 also (seemingly) uses bytecode, unlike the main FOSS implementations of ASN.1. Protocol Buffers started off with codegen (burying Google user in de/serialization code) but UPB uses “table-driven”, i.e. bytecode, parsing[2]. The most interesting chapter in this long history is in my opinion Swift’s bytecode-based value witnesses[3,4]. Swift (uniquely) has support for ABI compatibility with polymorphic value types, so e.g. you can have a field in the middle of your struct whose size and alignment only become known at dynamic linking time. It does this in pretty much the way you expect[5]: each type has a vtable (“value witness”) full of compiler-generated…
Ygg2 · 2022-09-20
Well, that's partially true and partially false. Operators are syntax sugar for trait methods. Indeed, some operators can't be overloaded[1]. However, in that case, it's possible to make procedural macros that can handle such cases. SQL builder programmers, for example, wanted assignment operator overload. However, I'd argue that it's the wrong kind of overload to enable. The more code can do behind the scenes, the harder it is to reason about it, e.g. : c = b; Is this an assignment? Will it start the DB connection? In Rust, it can be just one thing. By sticking that code in proc macro and translating code, you signal your intent that something funny is happening here and that you should consult docs for more info: sql!(a = b) > It is easy to insist you have never needed any of that stuff for your library, I didn't say it was easy. I didn't say it was impossible either https://mcyoung.xyz/2021/04/26/move-ctors/. > Then there are the things the borrow checker will not let you do, that would be correct, but it can't see that. Sure, but that's the Rice theorem at work (https://en.wikipedia.org/wiki/Rice%27s_theorem). Any non-trivial property of code is undecidable. That's why you have the unsafe escape hatch where you reason about why it's safe. [1] which isn't that different C++ which prohibits some operator overload, but in C++ the list of operator not overloaded is small

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close