Jean-Baptiste Kempf
๐ค SpeakerAppearances Over Time
Podcast Appearances
How is the data shared between the functions?
Because there's a convention, what's known as a calling convention.
And what David does for optimal reasons is create its own calling convention sometimes.
So if I want to call Lex Friedman's library, we've got to agree on a convention so that I can share data with you in the assembly language space.
And one of the challenges in assembly is every operating, well, not every operating system, but there are at least four that I can think of on x86.
Linux 32-bit, Windows 32-bit, Windows 64, Linux 64.
They all have their own calling conventions.
And so one of the amazing things Lauren Merritt did, who we talked about before, was create a very lightweight abstraction layer.
So you could write your assembly code once and it handled all the calling convention stuff for you.
which was always a problem because you had to manage four different variants.
But David takes this even further.
For speed reasons, it does its own calling convention within itself to bypass the kind of rules, the rules of sort of functions and say, okay, actually I'm going to call a function this way because I know it's within my library.
Does it have to be special to every single operating system?
Well, if it's custom, no, but the challenge is...
In general, yes.
And in terms of each instruction set.
So the thing to also emphasize is we do this on every instruction set.
So every instruction set has its own handwritten assembly, which is even more crazy.
And that matrix has got bigger in recent years because of RISC-V, because of...
ARM64 because of the new SVE.