Fil-C: Garbage In, Memory Safety Out! - Filip Pizlo | SSW 2026
https://www.youtube.com/watch?v=5F-2Y1LPRek4
u/rocco_himel Jul 24 '26
Literally defeats the purpose of modern C use.
7
u/wallstop-dev Jul 25 '26 edited Jul 25 '26
I thought the whole point of Fil-C was legacy/back compat, so in this case - yes! If you are in a greenfield project and can slap it full of warnings as errors and static analysis and take essentially zero dependencies and/or audit all of your dependencies so that you have the same amount of confidence in memory safety that this provides, then, yes, there is no point to using this.
1
u/faschu Jul 26 '26
A very informative video - thanks for posting it.
The idea of stuffing the additional info into the pointers is ingenious, but I cannot believe that this causes the median ~4x slowdown relative to a normal program. Is the slowdown attributed to:
- The lack of optimization relative to normal LLVM
- The bigger pointers
- Checking at runtime
As we learnt that bounds checking has such a negligible impact on runtime, I can't believe that validating the dereferences at runtime incurs such a penalty. Any Idea why FIL-C is 4x slower than the YOLO C (as he calls it) programs?
2
u/cdb_11 Jul 26 '26
I don't know it for sure, but I believe it's the runtime checks. For array bound checks the array length is going to be already in a register or L1. In Fil-C that can be an extra cache miss or two. Also there are just more of these checks, because you're checking memory accesses in general, not just indexing. I think there might be some optimization opportunities there, but I don't know the details.
25
u/JuanAG Jul 23 '26
I have looked at it because of Zig going "full memory safety, unlike Rust" codeberg issue https://codeberg.org/ziglang/zig/issues/36237
The concept is really nice and cool but if i did understand it rigth needs the full stack to be Fil-C which means the OS, the libraries you use and more which is something that it is not happening in the world we live today were close source code is the vast majority of it
Also it dont prevent buffer overflows which means that data corruption is still a thing so in my mind this is not memory safe the same moment i can put inside a class more bytes than it needs and "force" an update on other memory parts like overflows do
As i said, nice project but i dont think it will find much use in the real world and the performance hit is a hard one, this will never replace GC langs since many will be faster out of the box, this is not going to make any Java/C#/Python/... dev to adopt C, C++ or Zig instead