Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ot
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
211.
▲
by
ot
3y ago
It is a very fortunate coincidence that C++ reached the ideal feature set right around the time I learned it.
212.
▲
by
ot
3y ago
Was that a later edit? I didn't see it when I read the comment. Also what's the point of saying that something is not possible and then "actually it's possible, but I don't like it anyway" in parentheses? What
213.
▲
by
ot
3y ago
> because readers are still contending on a cache line to update the reader count They don't have to, see my sibling comment about folly::SharedMutex.
214.
▲
A Concurrency Cost Hierarchy
(travisdowns.github.io)
3 points
by
ot
3y ago
|
0 comments
215.
▲
by
ot
3y ago
Yes, though note that RW locks need to maintain the count of readers, and most implementations just use use a single counter in the lock state word, which makes them as subject to contention as a reference count. folly::SharedMutex, the mai
216.
▲
by
ot
3y ago
Can't speak for abseil and tbb, but in folly there are a few solutions for the common problem of sharing state between a writer that updates it very infrequently and concurrent readers that read it very frequently (typical use case is
217.
▲
by
ot
3y ago
Was it maybe Dr Dobb's? Mark Nelson had an excellent series of articles about compression which opened up that world for me. I ended up working on compression for my PhD many years later. I can't find any archives for Dr Dobb'
218.
▲
by
ot
3y ago
> The consume memory order is not used much. That's because no compiler implements it, it just becomes an acquire in practice. Nobody has figured out how to maintain all the necessary invariants across all optimization passes.
219.
▲
by
ot
3y ago
Thanks for checking! > It turns out that it performs exactly the same number of comparisons as my lower_bound_overlap. This is surprising, shouldn't the number of comparisons be identical to the standard implementation?
220.
▲
by
ot
3y ago
> However, I’ve found that some compilers, e.g. GCC on x86-64 will refuse to make this variant branchless. I hate how fickle compilers can be sometimes, and I wish compilers exposed not just the likely/unlikely attributes, but also
221.
▲
Could GPT help with dating anxiety?
(scottaaronson.blog)
3 points
by
ot
3y ago
|
1 comments
222.
▲
by
ot
3y ago
> Not sure if it has changed since. It hasn't, Clang/GCC emit a cmpxchg16b only if you opt-in with `-mcx16`, which changes the ABI.
223.
▲
by
ot
3y ago
Generally you have a small number of bits to count the waiters, because the mutex state has to be a word you can CAS and so you have either 32 or 64 bits to pack all the state you need. If your counter saturates you lose track of the waiter
224.
▲
by
ot
3y ago
This seems to me like a parallel accumulation problem, why not have each thread accumulate a filter on a subset of the data (so no locking involved), and then reduce the results (which is just an OR of all the local accumulations)?
225.
▲
A Concurrency Cost Hierarchy
(travisdowns.github.io)
3 points
by
ot
3y ago
|
0 comments
226.
▲
Pixel Fold is nearly here
(store.google.com)
1 points
by
ot
3y ago
|
0 comments
227.
▲
by
ot
3y ago
If you are going to do batch operations, your data structure should be optimized to support them, so you're back to one CAS. The same would apply to the locked scenario, where you probably don't want to copy 1000 elements in the c
228.
▲
by
ot
3y ago
This seems unnecessarily pedantic. Lock-free conventionally implies concurrent, otherwise it's meaningless.
229.
▲
by
ot
3y ago
This is true in principle and it is good calling it out, but in practice I've never seen a mutex-based data structure beat an equivalent lock-free data structure, even at low contention, unless the latter is extremely contrived. A mute
230.
▲
by
ot
3y ago
The fact that Bach quotes pop music doesn't, on its own, make Bach music pop.
231.
▲
Testing the Performance of ClickHouse
(clickhouse.com)
8 points
by
ot
3y ago
|
0 comments
232.
▲
A new, unique AI dataset for animating amateur drawings
(ai.facebook.com)
2 points
by
ot
3y ago
|
0 comments
233.
▲
C++23's New Fold Algorithms
(devblogs.microsoft.com)
5 points
by
ot
3y ago
|
0 comments
234.
▲
by
ot
3y ago
This thread by Matthew Green explains a bit better why this is significant: https://twitter.com/matthew_d_green/status/16465167988405166...
235.
▲
by
ot
4y ago
Lambdas are free. Unless the class type-erases the callback (and MutexProtected doesn't), and the callback is not huge, the compiler is virtually guaranteed to inline it.
236.
▲
by
ot
4y ago
That's how folly::Synchronized works, it supports both the callback interface as MutexProtected, and an interface that returns a RAII lock holder that gives access to the underlying object. It is generally the preferred synchronization
237.
▲
by
ot
4y ago
Sure, there are plenty of complexity classes :) but TFA is about derandomization of BPP, even if it doesn't mention the class by name, it talks about Nisan-Widgerson.
238.
▲
by
ot
4y ago
It's not "probably polynomial time", it's polynomial time with bounded error probability. Derandomization means bringing the probability to 0. The definition of a PRNG in complexity theory (for the purposes of this topic
239.
▲
by
ot
4y ago
Chomsky postulates that all languages boil down to a universal set of rules, and he went as far as saying that this is biologically motivated, as if there was a "language device" in the brain. Norvig was one of the pioneers in pro
240.
▲
by
ot
4y ago
> This isn’t just about semantics It really is. What people mean is "it's for the public good". Write it like that and the premise for the article is gone. EDIT: I want to add that this looks to me like a fallacy that is v
More ›