Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tavianator
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
tavianator
3mo ago
Didn't Google have a tool for this called MOE (Make Open Easy) like 15 years ago? I remember it from some of my open source contributions to Guice
2.
▲
by
tavianator
6mo ago
> Airplanes don't have wings ???
3.
▲
by
tavianator
8mo ago
No: https://en.wikipedia.org/wiki/Sony_Computer_Entertainment_Am...
4.
▲
by
tavianator
11mo ago
Presumably that's just a mistake. The author calls it "stochastic gradient descent" correctly elsewhere in the article
5.
▲
There is no memory safety without thread safety
(ralfj.de)
456 points
by
tavianator
1y ago
|
503 comments
6.
▲
by
tavianator
1y ago
I did try it a while ago and it wasn't profitable, but that was before I added stat() support. Batching those is probably good
7.
▲
by
tavianator
1y ago
My bfs project also uses io_uring: https://github.com/tavianator/bfs/blob/main/src/ioq.c I'm curious how lsr compares to bfs -ls for example. bfs only uses io_uring when multiple threads are e
8.
▲
by
tavianator
1y ago
You may want to look into improvements to A* for grids, like Rectangular Symmetry Reduction.
9.
▲
by
tavianator
1y ago
> There was no other helix db https://en.wikipedia.org/wiki/Helix_(database)
10.
▲
by
tavianator
1y ago
They were referencing the title of a specific paper, which invented type classes: https://dl.acm.org/doi/10.1145/75277.75283
11.
▲
by
tavianator
1y ago
The C standard (since C99) says that `main()` has an implicit `return 0`, you don't need to write it explicitly.
12.
▲
by
tavianator
1y ago
I was looking for a relevant paper and found this one, which isn't what I was looking for but is related: https://sigops.org/s/conferences/hotos/2023/papers/liargkova...
13.
▲
by
tavianator
1y ago
My actual "production" implementation of this concept does support that: https://github.com/tavianator/bfs/blob/main/configure But I wanted the blog post sized version to be simpler for exposit
14.
▲
by
tavianator
1y ago
Just tried reconfiguring LLVM: 27.24s user 8.71s system 99% cpu 36.218 total Admittedly the LLVM build time dwarfs the configuration time, but still. If you're only building a smaller component then the config time dominates:
15.
▲
by
tavianator
1y ago
Fixed! https://github.com/tavianator/tavianator.com/commit/aa9d99d5...
16.
▲
by
tavianator
1y ago
Nice! I used to do something similar, don't remember exactly why I had to switch but the two step process did become necessary at some point. Just from a quick peek at that repo, nowadays you can write #if __has_attribute(cold) and av
17.
▲
by
tavianator
1y ago
Whoops! Forgot to do that when I switched from a ``` block to raw html
18.
▲
by
tavianator
1y ago
You might be interested in rawhide[1] or fselect[2]. (Note: I don't really use them myself, but they seem to offer something like what you're suggesting.) Also, this is still a find-style syntax, but my bfs utility supports -excl
19.
▲
by
tavianator
1y ago
At least with GNU coreutils, you can use `-r`/`--relative`
20.
▲
by
tavianator
1y ago
Someday I will get that functionality into fd :)
21.
▲
by
tavianator
2y ago
I've replaced Valgrind with sanitizers for most of my workflow. Using the sanitizer APIs in your custom allocator is also easy: https://github.com/tavianator/bfs/blob/main/src/sanity.h https:
22.
▲
by
tavianator
2y ago
Very interesting, thanks! If I get time I'll try to measure every instruction to see the whole set of affected instructions.
23.
▲
by
tavianator
2y ago
Wrote up the presumed explanation here: https://tavianator.com/2025/shlxplained.html
24.
▲
by
tavianator
2y ago
In general I'd be very surprised if code alignment had much effect on a 10,000 instruction block, especially since the instruction is 5 bytes long so it will quickly unalign itself
25.
▲
by
tavianator
2y ago
> Wait a sec, isn’t this backwards? No, if you push and pop RCX it's fast again. I mentioned this in the blog post, `mov rcx, 1` is slow but `mov rcx, 1; push rcx; pop rcx` is fast.
26.
▲
by
tavianator
2y ago
Right. Actually it turns out it's 11 bits, since [-1024, 1023] are all supported by the immediate add renamer. In general I think people are overstating the delay of an additional 64-bit add on register file reads (though I'm not
27.
▲
by
tavianator
2y ago
Benchmark code is in the post! The trick is to limit the number of SHLX instructions before you re-initialize RCX. Doing it every 10,000 keeps it fresh enough. I didn't have to disable preemption or anything, perf shows 0 context sw
28.
▲
by
tavianator
2y ago
I did try aligning the loop, it didn't matter
29.
▲
by
tavianator
2y ago
SAL and SHL are synonyms, they have the same encoding. SHL only accepts CL as the count register, there's no other form that takes a variable shift count
30.
▲
by
tavianator
2y ago
SHL suffers from the same latency issue as SHLX it turns out
More ›