Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ibraheemdev
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
ibraheemdev
5mo ago
Not the runtime per se, but cooperative scheduling has the advantage that tasks do not yield at adverse code points, e.g., right before giving up a lock, or performing an I/O request. Of course the lack of preemption has it's own
2.
▲
by
ibraheemdev
5mo ago
> OS threads are expensive: an operating system thread typically reserves a megabyte of stack space Why is reserving a megabyte of stack space "expensive"? > and takes roughly a millisecond to create I'm not sure where
3.
▲
Astral to Join OpenAI
(astral.sh)
1489 points
by
ibraheemdev
6mo ago
|
901 comments
4.
▲
Cuckoo hashing improves SIMD hash tables (and other hash table tradeoffs)
(reiner.org)
79 points
by
ibraheemdev
1y ago
|
1 comments
5.
▲
by
ibraheemdev
1y ago
It does make a difference of course if you're running fetch_max from multiple threads, adding a load fast-path introduces a race condition.
6.
▲
by
ibraheemdev
1y ago
pip, PDM, and uv already support PEP751 [0] and were involved in the design process. [0]: https://discuss.python.org/t/community-adoption-of-pylock-to...
7.
▲
by
ibraheemdev
1y ago
I did not claim that x86 provides sequential consistency in general, I made that claim only for RMW operations. Sequentially consistent stores are typically lowered to an XCHG instruction on x86 without an explicit barrier. From the Intel S
8.
▲
by
ibraheemdev
1y ago
Yes, what I meant was that the same instruction is generated by the compiler, regardless if the RMW operation is performed with relaxed or sequentially consistent ordering, because that instruction is strong enough in terms of hardware sema
9.
▲
by
ibraheemdev
1y ago
I'm referring to the performance implications of the hardware instruction, not the programming language semantics. Incrementing or decrementing the reference count is going to require an RMW instruction, which is expensive on x86 regar
10.
▲
by
ibraheemdev
1y ago
> There is no way the shared_ptr<T> is using the expensive sequentially consistent atomic operations. All RMW operations have sequentially consistent semantics on x86. It's not exactly a store buffer flush, but any subsequent
11.
▲
by
ibraheemdev
1y ago
> ParkingLot just uses pthread mutex and cond. That's interesting, I'm more familiar with the Rust parking-lot implementation, which uses futex on Linux [0]. > Sure that uses futex under the hood, but the point is, you use f
12.
▲
by
ibraheemdev
1y ago
> And futexes aren’t the only way to get there. Alternatives: > - thin locks (what JVMs use) > - ParkingLot (a futex-like primitive that works entirely in userland and doesn’t require that the OS have futexes) Worth nothing that so
13.
▲
by
ibraheemdev
2y ago
> The message has some weird mentions in (alloc565), but the actual useful information is there: a pointer is dangling. The allocation ID is actually very useful for debugging. You can actually use the flags `-Zmiri-track-alloc-id=alloc5
14.
▲
David Heinemeier Hansson joins Shopify's board
(shopify.com)
12 points
by
ibraheemdev
2y ago
|
2 comments
15.
▲
by
ibraheemdev
2y ago
> Every single Future you look at will look like this, That's not true. A Future is supposed to schedule itself to be woken up again when it's ready . This Future schedules it to be woken immediately. Most runtimes, like Tokio
16.
▲
by
ibraheemdev
2y ago
It's quite common for concurrent algorithms to only implement a subset of operations. For example forgoing, removal or iteration. It's also common to put limitations on the data structure, such as limiting keys and values to 64-bi
17.
▲
by
ibraheemdev
2y ago
Looks very interesting, but seems to serve a pretty different use case: > This is an ordered data structure, and supports very high throughput iteration over lexicographically sorted ranges of values. If you are looking for simple point
18.
▲
Uv: Unified Python Packaging
(astral.sh)
49 points
by
ibraheemdev
2y ago
|
7 comments
19.
▲
by
ibraheemdev
2y ago
Java atomics are actually sequentially consistent. C# relaxes this to acquire/release. Though the general concept of happens-before is still immensely useful for learning atomics as sequential consistency is a superset of acquire/
20.
▲
A fast and ergonomic concurrent hash-table for read-heavy workloads
(github.com)
2 points
by
ibraheemdev
2y ago
|
0 comments
21.
▲
Knuth
(sameerismail.org)
2 points
by
ibraheemdev
2y ago
|
0 comments
22.
▲
by
ibraheemdev
3y ago
Formatting the if onto a single line gets you most of the way there. if err != nil { return err }
23.
▲
by
ibraheemdev
3y ago
Yeah you're right regarding signal handlers (though I'm not sure the windows equivalent), and I was planning on adding a note about the alternative. The main thing I wanted to point out was that async/await as a model is buil
24.
▲
Thinking outside the box of code with Leslie Lamport
(changelog.com)
1 points
by
ibraheemdev
3y ago
|
0 comments
25.
▲
A Lock-Free Vector
(ibraheem.ca)
3 points
by
ibraheemdev
3y ago
|
1 comments
26.
▲
by
ibraheemdev
3y ago
Except pgx recommends using their native interface, not database/sql, for performance and extra features [0], so it's not that simple in practice. [0]: https://github.com/jackc/pgx#choosing-between-the-pgx-and
27.
▲
128-Bit Atomics Are Practical Now
(ibraheem.ca)
1 points
by
ibraheemdev
3y ago
|
0 comments
28.
▲
by
ibraheemdev
3y ago
> But we are deleting this bs. I only learned about it now! Will be gone by tomorrow. https://twitter.com/elonmusk/status/1641908130274525187?t=5t...
29.
▲
Building Blocks for Theoretical Computer Science (2017) [pdf]
(mfleck.cs.illinois.edu)
80 points
by
ibraheemdev
4y ago
|
3 comments
30.
▲
by
ibraheemdev
4y ago
https://asahilinux.org/ is looking very promising
More ›