Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
preshing
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
preshing
6y ago
One example is in: https://github.com/arc80/plywood/blob/master/repos/plywood/s... Here, only one data member is meant to be serialized. The others members are there to accelerate lookups into
2.
▲
by
preshing
6y ago
The biggest advantage I find with runtime reflection it that it's possible to load and manipulate data that has no C++ definition at all. This is actually handy when working with 3D geometry consumed by a GPU.
3.
▲
by
preshing
6y ago
Perhaps, but it's easily overlooked because every project that needs runtime reflection badly enough has already rolled their own. (Some game engines have multiple reflection systems, eg. shader parameters vs. serialization.) This fram
4.
▲
by
preshing
6y ago
This might come true some day, but it seems not in C++20 and in recent static reflection proposals there was no way to distinguish reflected from non-reflected members in the same class.
5.
▲
by
preshing
6y ago
It's the latter: A standalone framework that can be used by other projects. It's like a library (or suite of libraries) with separate modules for platform abstraction, containers, JSON, etc. A bit more "batteries included&quo
6.
▲
by
preshing
11y ago
OK, I tweaked it a little bit.
7.
▲
by
preshing
11y ago
Threads are not required to call QSBR::update at the same time. They can call it anytime, but they do need to call it.
8.
▲
by
preshing
11y ago
I think you might be right. Maybe I should edit the post and not call it "more scalable", since I only have six cores to test on. But if it does top out at a higher core count, there are several ways it could be optimized. Either
9.
▲
by
preshing
12y ago
> you've moved the fast path of the semaphore implementation into user space. I see now why your original comment was a bit inflammatory. I should have been more clear in the post that by "lightweight", I meant exactly tha
10.
▲
by
preshing
12y ago
If I implement the mutex as you suggest -- by using the native semaphore directly, with no separate counter -- the running time of "testBenaphore" increases from 375 ms to 3 seconds on my Windows PC. As mentioned in the article, m
11.
▲
by
preshing
13y ago
All the more reason to do our best to organize and share correct information about it.
12.
▲
This Hash Table Is Faster Than a Judy Array
(preshing.com)
8 points
by
preshing
14y ago
|
0 comments
13.
▲
by
preshing
14y ago
"The laws of mathematics." That's good! I've updated the previous post to use this wording, hope you don't mind :) http://preshing.com/20121025/heres-some-working-code-to-sort...
14.
▲
by
preshing
14y ago
> It may just be poor wording, but I don't think this sentence makes sense I can see how you could might have interpreted that sentence differently. I just tweaked it a little in the post, mainly changing "the sample" to "this sample".
15.
▲
by
preshing
14y ago
Why does it matter whether Carmack likes JavaScript? If he doesn't like it, it won't vanish in a puff of smoke.
16.
▲
Memory Barriers Are Like Source Control Operations
(preshing.com)
2 points
by
preshing
14y ago
|
0 comments
17.
▲
by
preshing
14y ago
There's no contradiction. Normally, the x86/64 memory model is quite strong, preserving LoadLoad, LoadStore, and StoreStore ordering. But doesn't preserve StoreLoad ordering; eg. stores can be reordered after loads, as you point out. As I u
18.
▲
by
preshing
14y ago
Based on your comment, I should probably be more precise and say: "the possibility of 'locking up' the entire application in some way". I'll update the post. There's nothing about this definition that prohibits a single thread from starvi
19.
▲
by
preshing
14y ago
I totally agree with you about the dangers of lock-free programming, and that every programmer will certainly make mistakes. I feel strongly enough about it that I actually wrote several paragraphs about the importance of stress testing loc
20.
▲
by
preshing
14y ago
Actually, I thought it was pretty clear in the article that it's not ok to use locks (mutexes) under the definition given. I tried pretty hard to use the most widely accepted definition of lock-free, even exchanging e-mails with Maurice Her
21.
▲
An Introduction to Lock-Free Programming
(preshing.com)
128 points
by
preshing
14y ago
|
20 comments
22.
▲
by
preshing
14y ago
Actually, it's not because the PPU executes in-order, which has only to do with the way the CPU orders instructions internally and says nothing about memory ordering. For example, the Xbox 360 has in-order processors too, yet you can observ
23.
▲
by
preshing
15y ago
Nice! Looking forward to the video for this one.
24.
▲
A Look Back at Single-Threaded CPU Performance
(preshing.com)
1 points
by
preshing
15y ago
|
0 comments
25.
▲
by
preshing
15y ago
True, but there are two reasons for that! One is because I'm too cheap to pay the premium my web host demands for https. The other is because most of the entropy is calculated in your browser via Javascript (even borrowing a JS implementati
26.
▲
Xkcd Password Generator
(preshing.com)
347 points
by
preshing
15y ago
|
291 comments