Clément Grégoire's Avatar

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!

91 Followers  |  201 Following  |  94 Posts  |  Joined: 18.11.2024  |  1.7026

Latest posts by lectem.bsky.social on Bluesky

Ahah, if it's too much work don't bother 😉

01.08.2025 08:33 — 👍 0    🔁 0    💬 0    📌 0

Nice!
Would it be possible to add a RSS feed to your blog? Helps me keep track of new posts!

01.08.2025 07:22 — 👍 1    🔁 0    💬 1    📌 0

@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!

11.07.2025 17:29 — 👍 2    🔁 0    💬 1    📌 0

It is indeed the initial goal! But for some applications you do need it to be somewhat accurate!

In any case, what I'm most bothered by is the fact that behavior really changes under load.

26.06.2025 13:39 — 👍 1    🔁 0    💬 1    📌 0
Preview
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...

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

26.06.2025 08:26 — 👍 9    🔁 4    💬 1    📌 0

Ah right, it's something I have struggled with in the past due to the STL not allowing to adopt memory (strings and vector come to mind)

25.06.2025 07:57 — 👍 1    🔁 0    💬 1    📌 0

Now that I think about it, world_string_dup might know about the destination language and do the correct thing?

25.06.2025 06:45 — 👍 0    🔁 0    💬 1    📌 0

Or can all the runtimes interpret the wit-string efficiently without copying data?

25.06.2025 06:42 — 👍 0    🔁 0    💬 1    📌 0

Interesting!

Am I correct when I say that we can assume that things will most likely be copied twice for cross-lang? Once when converting to world, once to convert back to native type?

I mean, in C it doesn't matter as ptr+size is OK, but for languages that do have a owning string type like C#?

25.06.2025 06:42 — 👍 0    🔁 0    💬 1    📌 0

Ah too bad, I'll be in Paris the 3rd but not the 1st 😅

24.06.2025 12:03 — 👍 1    🔁 0    💬 0    📌 0

Is it a private event? Would have been interested :)

24.06.2025 09:43 — 👍 0    🔁 0    💬 1    📌 0
Post image

Visiting Nvidia GTC today, if you're there let's meet!
#GTCParis

12.06.2025 10:21 — 👍 2    🔁 0    💬 0    📌 0
Preview
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...

Tracy 0.12 was just released with thread wake-up visualization, added by yours truly!
Check it out github.com/wolfpld/trac...

03.06.2025 05:33 — 👍 6    🔁 0    💬 0    📌 0

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?

27.05.2025 11:06 — 👍 0    🔁 0    💬 0    📌 0

And attempts fail is false. Steam has done major work on this regard.

It's just that the ecosystem is not friendly on this regard compared to other OSes.

14.05.2025 13:50 — 👍 0    🔁 0    💬 0    📌 0

Ofc I meant distribution outside of the PM (which is required for any kind of closedsource sofware). (think for example games)

There are solutions nowadays but still a pain compared to win/mac.

For debugging at least there's debuginfod that mimics symbol servers nowadays but it took ages

14.05.2025 13:48 — 👍 0    🔁 0    💬 1    📌 0

(the reason I say it has more to do with GNU is that this is more a of political stance than a technical one : they assume you can recompile from source)

14.05.2025 10:18 — 👍 0    🔁 0    💬 0    📌 0

To be fair I think it has more to do with GNU than UNIX 🤔

But yeah, binary distribution is still hell on Linux anyway, even with all the recent tooling...

14.05.2025 10:17 — 👍 0    🔁 0    💬 2    📌 0

It reduced a lot of string allocations for hashmaps using strings as keys.

Preloading all strings at boot seems to give a consistent 100-200MB win...

Looks like the allocation pattern was disastrous and was committing way more pages than needed, preloading changes that.

13.05.2025 16:10 — 👍 2    🔁 0    💬 0    📌 0

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

13.05.2025 16:08 — 👍 0    🔁 0    💬 1    📌 0
Preview
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...

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

04.05.2025 14:37 — 👍 59    🔁 23    💬 1    📌 0

From what I saw, the thread responsible for storing a value the value had been preempted, leading to the others spinlooping and setting the invalid value all the time.

22.04.2025 11:19 — 👍 1    🔁 0    💬 0    📌 0
Post image

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.

22.04.2025 08:41 — 👍 2    🔁 0    💬 1    📌 0

Ctrl+shift+f

15.04.2025 16:38 — 👍 1    🔁 0    💬 1    📌 0

Yeah, I often used Irfan view in the past but it's like, a bazooka where I'd like a nice and small knife 😅
And its UX is shit.

08.04.2025 14:42 — 👍 1    🔁 0    💬 0    📌 0

Someone should make a bloatfree, fast and noob friendly photo viewer, just like FilePilot with explorer but for photos :D

08.04.2025 13:17 — 👍 1    🔁 0    💬 1    📌 0
Post image

Really @microsoft.com ?

850MB for a godamn photo viewer that is slower and has a worse UX than the one shipped with Windows XP ?!

08.04.2025 12:52 — 👍 6    🔁 0    💬 1    📌 0

Are there idiosyncrasies related to date formating (as in, some crazy locale dependent stuff) or you just somehow ask the user for the date format entirely?

06.04.2025 21:00 — 👍 0    🔁 0    💬 1    📌 0

Like for 2024a:

Changes to past timestamps

> Asia/Ho_Chi_Minh's 1955-07-01 transition occurred at 01:00
not 00:00.
> From 1947 through 1949, Toronto's transitions occurred at 02:00
not 00:00.
> In 1911 Miquelon adopted standard time on June 15, not May 15.

Scary stuff.

06.04.2025 19:33 — 👍 0    🔁 0    💬 0    📌 0
- tz-announce - lists.iana.org

Does anybody really understand such things? 🤔
Like timezones, everybody gets the first 90% correct but then you happen to click the iana tzdb mailing list archive and cry lists.iana.org/hyperkitty/l...

06.04.2025 19:31 — 👍 1    🔁 0    💬 2    📌 0

@lectem is following 19 prominent accounts