Clément Grégoire's Avatar

Clément Grégoire

@lectem

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!

119
Followers
228
Following
130
Posts
18.11.2024
Joined
Posts Following

Latest posts by Clément Grégoire @lectem

I was going to say the same thing, they make it look like this was hard while Linux had RCU for more than 20years now 🤷

23.02.2026 00:52 👍 1 🔁 0 💬 0 📌 0

Oh nice it makes sense!
Sounds like a lot of work and tiny details to get that working.
Wonder if you'll be able to optimize out things such as spinloops :p

So in theory even allocations are expected to be "stable" and replay at the same memory address? Cool!

12.02.2026 18:31 👍 1 🔁 0 💬 1 📌 0

Oh I think I get it now(or maybe not), you need to replay from scratch/dump then? Then the tool will fake/replay kernel interactions? I suppose it requires so kind of determinism of the code in the first place? I suppose "records... intrinsics" means you record atomic operations too?

12.02.2026 17:57 👍 2 🔁 0 💬 1 📌 0

Yeah, access to old versions has been like this for a while sadly... Good luck 😅

12.02.2026 17:48 👍 1 🔁 0 💬 0 📌 0

Sounds nice! But my first questions with time travel debugging are always :
- what's the overhead?
- how long ago can I go in the past on big games? (for example UE based)
- what about gpu sync?

12.02.2026 17:45 👍 0 🔁 0 💬 2 📌 0
Preview
Intel VTune Amplifier for Windows - Free download and software reviews - CNET Download Download Intel VTune Amplifier latest version for Windows free to try. Intel VTune Amplifier latest update: February 29, 2024

Well there's download.cnet.com/intel-vtune-... but it seems a bit too old 😅
Good luck!

12.02.2026 17:39 👍 0 🔁 0 💬 1 📌 0

You'd lack most other perf counters provided by vtune though.

12.02.2026 17:15 👍 0 🔁 0 💬 1 📌 0

You could probably add it to tracy pretty "easily" since we already support it on Linux, you'd only need to add it to the kernel etw session and do the proper translation to Tracy's event buffers.

12.02.2026 17:14 👍 0 🔁 0 💬 1 📌 0

Well, my guess is that it's mostly under documented. ETW can collect certain PMU events since win8 I believe, but for those not known to ETW you need driver support. It also (iirc) only allows sampling, not direct access through code.

12.02.2026 17:11 👍 0 🔁 0 💬 1 📌 0
Preview
Why I Prefer Exceptions to Error Values CedarDB is a database system that delivers unmatched performance for transactions and analytics, from small writes to handling billions of rows. Built on cutting-edge research to power today’s tools a...

I've long been opposed to exceptions for reasons, but I have to admit there are use cases.
I don't really agree with most of what is said in the article, but it does make some points.

cedardb.com/blog/excepti...

03.02.2026 06:18 👍 0 🔁 0 💬 0 📌 0

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.

30.01.2026 06:27 👍 1 🔁 0 💬 0 📌 0
Preview
Spinning around: Please don't! - siliceum Embark on a journey about why you should sometimes trust your OS more than yourself.

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...

27.01.2026 10:40 👍 23 🔁 9 💬 1 📌 1

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!

04.01.2026 13:29 👍 1 🔁 0 💬 0 📌 0
Post image

Cup arrived right before Christmas, thanks @matt.godbolt.org

23.12.2025 22:38 👍 1 🔁 0 💬 0 📌 0

It's getting harder and harder to optimize for new CPUs, we now have NUMA on consumer CPUs...

20.12.2025 22:29 👍 0 🔁 0 💬 0 📌 0
Preview
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...

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".

16.12.2025 18:51 👍 467 🔁 191 💬 19 📌 12
Post image

Did I mention I hate the webdev ecosystem ?

10.12.2025 15:13 👍 1 🔁 0 💬 0 📌 0

Luckily the @vite.dev's team got it right in rollup... so it's time for us to switch to rollup and dump esbuild.

Still, web dev sucks.

09.12.2025 10:46 👍 0 🔁 0 💬 0 📌 0
Post image

As if it was not already wasteful for Objects imports (this is only really needed for non-Object types)...

It creates one such object PER file doing any import, even if you only need 1 export from the original !

Now let's say you have a SDK with ~780 exports & 171files...
That's 120000 functions!

09.12.2025 10:44 👍 0 🔁 0 💬 1 📌 0

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.

09.12.2025 10:44 👍 0 🔁 0 💬 1 📌 0

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.

08.12.2025 08:44 👍 3 🔁 0 💬 0 📌 0

Nice to finally see the busy/wait/idle for gpu queues, bubbling was a major issue for a previous client of mine (mitigated by fixing the command list merging, I think it's now OK upstream)

03.12.2025 10:44 👍 1 🔁 0 💬 0 📌 0

Depends on your OS, on Linux it's easy, on windows you need to juggle with power plans (I've got an internal tool for that, I need to release someday...)

03.12.2025 09:40 👍 1 🔁 0 💬 0 📌 0

Yep, same as the CPU and other things.
Though it still matters to sometimes profile without stabilizing your machine as it's the "end-user experience", and things such as power change latency can actually kill the perf of your app.
But 90%of the time please do stabilize your machine.

03.12.2025 00:59 👍 2 🔁 0 💬 1 📌 0

Mine started by finding yet another bad spinlock in a widely used library.

02.12.2025 12:22 👍 1 🔁 0 💬 0 📌 0

If you do try it out or already use it I'd be interested in the results!

02.12.2025 07:10 👍 0 🔁 0 💬 1 📌 0
Preview
Unlocking the secrets of ETW: Stack Caching Unlocking the secrets of ETW: Stack Caching. GitHub Gist: instantly share code, notes, and snippets.

I'm afraid it's less exciting than it sound, it's basicly just caching!
I've seen some reports (don't remember where exactly) that it does slow down the collection somehow (I didn't verify)

gist.github.com/Zhentar/7f3f...

02.12.2025 07:10 👍 1 🔁 0 💬 1 📌 0

Interesting! I did a similar experiment in the past for another profiler but never finished it.
Note you could even pack your pages by storing bidepth and numelements in the upper 12bits of your data pointers :)

02.12.2025 07:06 👍 0 🔁 0 💬 0 📌 0

Well, there is actually an option to compress callstacks, but depending on your workload it might not save much space. (I have a link to something related somewhere, if you're interested)

02.12.2025 06:49 👍 2 🔁 0 💬 1 📌 0

Even the minigames shipped on the minidiscs were kind of good for the time

27.11.2025 07:04 👍 1 🔁 0 💬 0 📌 0