Re:A 40-line fix eliminated a 400x performance gap
by jerrinot on Tuesday January 13, 2026 @08:02PM
(#46610981)
That's a brilliant trick. The setup overhead and permission requirements for perf_event might be heavy for arbitrary threads, but for long-lived threads it looks pretty awesome! Thanks for sharing!
[ Parent
| on HN ]
Re:A 40-line fix eliminated a 400x performance gap
by ot on Tuesday January 13, 2026 @08:05PM
(#46610998)
Yes you need some lazy setup in thread-local state to use this. And short-lived threads should be avoided anyway :)
Re:A 40-line fix eliminated a 400x performance gap
by catlifeonmars on Wednesday January 14, 2026 @02:39AM
(#46613391)
I guess if you need the concurrency/throughput you should use a userspace green thread implementation. Iām guessing most implementations of green threads multiplex onto long running os threads anyway