Clément Grégoire
@lectem.bsky.social
French C++ developer, consultant & co-founder @ siliceum. Performance optimization, multithreading, rendering APIs and game engines. I know too much about Webkit and JS for my own good. I do reverse engineering for fun!
Given how bad and slow Opus results are lately, I wouldn't be surprised if @anthropic.com pulled the old mechanical turk trick on us and hired an army of Indian devs to prompt smaller models to save on costs.
I keep seeing `if(file_exists(path)) do_something(path)` and similar. This infuriates me. STOP FUCKING DOING 2 SYSCALLS THIS IS BOTH SLOW AND NON ATOMIC. FFS please... I've even seen it in teaching materials, do everyone a favor and read en.wikipedia.org/wiki/Time-of...
Time-of-check to time-of-use - Wikipedia
en.wikipedia.org
Oh mah! Look, spinlocks are at it again (this time in the kernel, there's no escape!)
New article! A user is reporting full system freezes while using Superluminal on Linux. What do you do? Cry? Well, we did a little bit. But we also dove into the kernel...again, this time fixing several issues in eBPF's spinlock implementation. Read all about it: rovarma.com/articles/a-t...
Dear frontend developers: Stop fucking using buttons instead of links! I want to be able to copy, open in new tab,... Well, have links be links and not buttons. Thanks.
Ever wrote spin-locks or had to debug them? I have, and I got tired of seeing (and writing) crappy ones, so I did a real investigation this time. Spoiler: trust your OS. siliceum.com/en/blog/post...
Spinning around: Please don't! - siliceum
Embark on a journey about why you should sometimes trust your OS more than yourself.
siliceum.com
Can we all agree that OpenSSL sucks by requiring perl to build in 2026? I'm not even asking for CMake support, just no stupid dependencies!
My "No Graphics API" blog post is live! Please repost :) www.sebastianaaltonen.com/blog/no-grap... I spend 1.5 years doing this. Full rewrite last summer and another partial rewrite last month. As Hemingway said: "First draft of everything is always shit".
No Graphics API — Sebastian Aaltonen
Graphics APIs and shader languages have significantly increased in complexity over the past decade. It’s time to start discussing how to strip down the abstractions to simplify development, improve pe...
sebastianaaltonen.com
Today a new episode of "Web sucks"! When handling import of an external library, ESBuild generates some kind of import table for the whole library. But since it needs to mimick ESM modules, it creates the "exports" object using Getters instead of properties.
Movie you’ve watched more than six times with a gif. Hard mode: no Stars (Wars nor Trek), LOTR, or Marvel, Disney Animated or Pixar.
a man is petting a small black dog in his arms .
ALT: a man is petting a small black dog in his arms .
media.tenor.com
Movie you’ve watched more than six times with a gif. Hard mode: no Stars (Wars nor Trek), LOTR, or Marvel, Disney Animated or Pixar.
So UE5 has a tool that generates perf reports, with a whole Metadata generation thing (in XML) that allows to customize reports. But it still displays averages for timings everywhere. Oh, and their perf bench tool is implemented using 3layers of different technologies.
Finally took the time to buy a licence for Fork. Truly the best UI for git, as it's the only one that never disappointed me. It's only missing Linux support but otherwise well worth its price. @fork_dev@mastodon.social
New blog post about my journey into the ETW depths, I had long wanted to look into it, now I'm starting to regret it (just a bit). But this is great if you want to write your own tools for profiling! www.siliceum.com/en/blog/post...
ETW Events and thread names - siliceum
Thread names are one of the most crucial information one can get system activity. However Windows ETW does not make it easy to retrieve!
siliceum.com
@openvibe.social the app is really great except for one thing killing the experience for me on android: No way to copy a link or open it on your browser because you hide the webview toolbar!
While writing test code for an article on sampling profilers, I ended up in analyzing methods for high resolution sleeps on Windows. Follow me into the rabbit-hole of high resolution timers! www.siliceum.com/en/blog/post...
Windows and high resolution timers - siliceum
While writing test code for an article on sampling profilers, I ended up in analyzing methods for high resolution sleeps on Windows. Follow me into the rabbit-hole of high resolution thread sleeps and...
siliceum.com
Tracy 0.12 was just released with thread wake-up visualization, added by yours truly! Check it out github.com/wolfpld/trac...
Release Tracy Profiler 0.12 · wolfpld/tracy
For a more detailed change list, see https://github.com/wolfpld/tracy/blob/v0.12.0/NEWS. CPU topology includes die To enable better insight into potential performance pitfalls the profiler will now...
github.com
Just discovered @ap.brid.gy that let's you interact with Mastodon users! But it requires people from there to enable it too so... A bit limited?
Implemented a simple String Interning class for a client last week. Physical memory usage: Before: 1.9GB After: 1.5GB Using a preloaded cache: 1.3GB I might be on to something here...
New blog post! "Load store conflicts", in which we look at some performance sensitive code that has surprisingly dramatic performance swings based on the compiler and the microarchitecture used. Reposts appreciated! zeux.io/2025/05/03/l...
Load-store conflicts
meshoptimizer implements several geometry compression algorithms that are designed to take advantage of redundancies common in mesh data and decompress quickly - targeting many gigabytes per second in...
zeux.io
This is the third time I find issues due to codebases using rpmalloc this year... Spinlocking without any kind of pause/yield is such a bad idea. One of my threads got stuck for 4.5s !!!! At this point, I can only advise to stop using rpmalloc.
Really @microsoft.com ? 850MB for a godamn photo viewer that is slower and has a worse UX than the one shipped with Windows XP ?!
One thing people really like about Superluminal is that it Just Works, and we’re trying hard to get that same experience on Linux. But this platform sometimes really feels like it’s actively fighting against anything “just working” and it would really prefer you Do The Work tyvm.
Following my article from yesterday, this link was shared on the DirectX discord. It's a community ran database of information about GPUs and their features. Pretty awesome and very useful to check compatibility!
D3d12infoDB
d3d12infodb.boolka.dev
Finally published an article I wrote eons ago about D3D12 descriptors and easy optimisations that you can do. This can save you both CPU time and memory! www.siliceum.com/en/blog/post...
Optimizing copy of null descriptors in D3D12 - siliceum
Discover how a few simple tweaks can help save CPU time and memory when using Direct3D12 desciptors.
siliceum.com
I'm always surprised by the fact that the first answer to "we have perf problems" is to change the language. I mean, going native is obvious. But why didn't they start by using a proper profiler with instrumentation is beyond me.
Today we're thrilled to announce our effort to port the TypeScript compiler and language service to native code, gaining a 10x speed boost in build times and editor responsiveness! devblogs.microsoft.com/typescript/t...
Lost almost a day due to newer DbgHelp versions suddenly failing to load my .pdb files... Turns out they changed a small check that now requires all sizes to be 8bytes aligned. The intent was clearly to check that alignment of array entries was correct, but it ended up checking the size too...