Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yosefk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
yosefk
2y ago
Is this from a shared library (compiled with -fPIC and linked with -shared) though? That's where the big troubles start and I think C isn't better than C++ here
62.
▲
by
yosefk
2y ago
For a tracing profiler, you want to know which thread a function call or return was made by. LTTng has kernel modules which it can use to trace context switches, and then a per-CPU trace buffer is fine, provided that you get cheap atomic wr
63.
▲
by
yosefk
2y ago
Ah, but you can "inline" it by hardcoding its implementation details into your code in the most horrible way imaginable, as suggested by a crafty reader and which, scarily enough, seems to be the fastest and most robust TLS acce
64.
▲
by
yosefk
2y ago
Thanks for you kind words! I don't think build systems add -fPIC automatically, nor remove it automatically. C++ build systems do not stoop to the question of how to best build a C++ program, by and large. They are more task graph exec
65.
▲
by
yosefk
2y ago
Sampling profilers are indeed very low-overhead, however they can't help debug tail latency, for which tracing profilers are indispensable: https://yosefk.com/blog/profiling-in-production-with-functio... https:&#
66.
▲
by
yosefk
2y ago
I discuss Intel Performance Trace in the writeup where I propose my much simpler hardware support for tracing: https://yosefk.com/blog/profiling-in-production-with-functio... Like I said there, I'm frankly shocked
67.
▲
by
yosefk
2y ago
I dunno if extremely fragile; I recommend trying funtrace on your own code - pretty sure it will work out of the box! But, what's less fragile than interposing pthread_create which doesn't add a load and a branch to every functi
68.
▲
by
yosefk
2y ago
-ftls-model=local-dynamic barely changes the generated code compared to the default (global-dynamic); you no longer have data16 prefixes around the call to __tls_get_addr (which means this call can't be replaced with something cheaper
69.
▲
by
yosefk
2y ago
I have updated the post with all the suggestions people replied with except this one, because I don't understand it. How do I allocate memory for addressing it with FS/GS? Isn't FS the register pointing to the TLS area - then
70.
▲
by
yosefk
2y ago
Doesn't the "initial exec" model require the user to run the executable with LD_PRELOAD=your.so or linking against your.so (DT_NEEDED)? eg would it work with a Python extension module which is dlopen'd at runtime?
71.
▲
by
yosefk
2y ago
Author here - any tips on dirty tricks somehow using %fs + offset from a shared library, without calling __tls_get_addr and without recompiling the executable (for instance, from a Python extension module) are most welcome! (I have one such
72.
▲
by
yosefk
2y ago
compiling crates in parallel is fast on a good machine. OTOH managing C++ dependencies without a standard build & packaging system is a nightmare
73.
▲
by
yosefk
2y ago
He is probably good at getting paid and getting credit for what he does, but he would need to be good at it to do any good for any other stakeholder, even more than he would need it to be a happy parasite inside the company. We don't k
74.
▲
by
yosefk
2y ago
it does present a conclusion. once the kernel supports .sframe it will be all-around superior to -fomit-frame-pointer, and a better default for distros to use.
75.
▲
by
yosefk
2y ago
Very inspiring! I'm off to "embed quality elements into my deliverables to increase consistency and velocity." Apart from the tone, I agree that it's awesome when an engineer understands your fucked up process and manage
76.
▲
by
yosefk
2y ago
Whichever way it's true in, it's not true in the sense that eg you can approximate any curve with a single layer neural net, and you're not actually going to be able to do it for problems CNNs or transformers work decently on
77.
▲
by
yosefk
2y ago
are you sure they are subsidizing them and not simply producing them more cheaply?
78.
▲
by
yosefk
2y ago
Bit flips in RAM due to radioactive meat passing by as proven by measuring with equipment obtained from the military with the help of a few shots of vodka - it doesn't get any more Soviet than this. But, to flip a bit in a memory devic
79.
▲
by
yosefk
2y ago
The reasons for all this stuff having been developed in Python also make Python interesting right now, all by themselves. It did not happen by accident; this stuff was developed fairly recently and there was no shortage of mature languages
80.
▲
by
yosefk
2y ago
It's a valid point, though I don't think the article says it (OC does.) The question is if changing the designation will actually do more good than harm. My skepticism here is completely uninformed and if there's a track reco
81.
▲
by
yosefk
2y ago
in practice, the current fight against conservation of nature (on the grounds of humans having lived in the given area or having influenced it - a popular argument today) will do nothing except destroying what's left of it. the fact th
82.
▲
by
yosefk
2y ago
why isn't this getting traction? it's a pretty big deal. it's the most safe of proposed C++ safety extensions by far
83.
▲
by
yosefk
2y ago
Around 30 years ago, STL introduced an allocator template parameter everywhere to let you control allocation. Here in 2024 we read about making use of the, erm, strange semantics of dynamic linking to force standard C++ code to allocate you
84.
▲
by
yosefk
2y ago
it would be interesting if you shared more details
85.
▲
by
yosefk
2y ago
Too much "bleak Chinese economy" pieces in the West, not enough "China is leapfrogging us" takes. eg China uses machine learning to automate production more than is done in the West and lowers production costs, meanwhile
86.
▲
by
yosefk
2y ago
-fno-exceptions FTW. (Of course you can't always do this. Great to do this early on before it's too late and the code is full of exceptions IMO.)
87.
▲
by
yosefk
2y ago
It's subjective how rewarding it is but you can definitely guess the word if you know, well, words, by doing a binary search and narrowing down the first letters. I have an uneasy relationship with puzzles and I'm not a native spe
88.
▲
by
yosefk
2y ago
anyone with no time to properly setup an IDE before delving into some code to quickly find something out becomes that "vim/emacs user". Certainly in C++ you can't make sense of the code without the right defines and incl
89.
▲
by
yosefk
2y ago
There are absolutely awesome experienced developers with no online presence whatsoever. I suspect they are the majority
90.
▲
by
yosefk
2y ago
Agreed, but that was the bar set by the comment I was replying to, which claimed Python doesn't clear it.
More ›