Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkhuong
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
31.
▲
by
pkhuong
1y ago
It's classic Lin Kernighan ( http://webhotel4.ruc.dk/~keld/research/LKH/ ) for the primal heuristic, and optimality proof by Concorde for cutting plane generation and branching ( https://www.math
32.
▲
by
pkhuong
2y ago
Someone tell that to the standard library. No memory safety involved in non-zero numbers https://doc.rust-lang.org/std/num/struct.NonZero.html#tymeth...
33.
▲
by
pkhuong
2y ago
One might assume the cryptographic code was somewhat audited by Thomas Ptacek.
34.
▲
by
pkhuong
2y ago
With linear probing RH, a failed lookup can stop as early as a successful one, as long as you also store the hash (useful for fast insertion): stop looking when you'd insert the key you're looking for before the current entry.
35.
▲
by
pkhuong
2y ago
I've been summarising treewidth as the minimal number of variables you have to carry from one stage to the next(s) to solve with dynamic programming. You're on your own for fractional hypertreewidth though.
36.
▲
by
pkhuong
2y ago
I've used blocks with a dummy RTL and extracted the callback from the block descriptor... it worked.
37.
▲
by
pkhuong
2y ago
You can do a little better if you tweak the low order bits ( https://pvk.ca/Blog/LowLevel/software-reciprocal.html for the double float version)
38.
▲
by
pkhuong
2y ago
The performance complaints seem to be mostly about buffer management. Rust hashers may flush their internal buffers whenever they want, as long as it's deterministic: > Thus to produce the same hash value, Hash implementations must
39.
▲
by
pkhuong
2y ago
also UB according to the spec, but LLVM is free to define it. e.g., clang often converts trivial C++ copy constructors to memcpy, which is UB for self-assignment, but I assume that's fine because the C++ front-end only targets LLVM, an
40.
▲
by
pkhuong
2y ago
It does nothing, but is only defined when the pointers point into or one past the end of valid objects (live allocations), because that's how the standard defines the C VM, in terms of objects, not a flat byte array.
41.
▲
by
pkhuong
2y ago
You can use something like White Rabbit ( https://en.wikipedia.org/wiki/White_Rabbit_Project ) to keep clocks in sync. That still involves estimates, but a dedicated time sync network can do things like make sure all the
42.
▲
by
pkhuong
2y ago
Yeah, that's the same structure. For simple comparisons, I would expect a conditional move, 0 branch except for the data-independent loop.
43.
▲
by
pkhuong
2y ago
auto length = last - first; while (length > 0) { auto half = length / 2; if (comp(first[half], value)) { // length - half equals half + length % 2 first += length - half;
44.
▲
by
pkhuong
2y ago
OpenSSL is the worst because some configurations execute asm generated by a specialised program. That code clobbers the frame pointer (gotta go fast!) but isn't annotated with dwarf unwinding info (what do you mean you want to know wha
45.
▲
by
pkhuong
2y ago
https://github.com/goblint/cil/blob/develop/LICENSE Copyright (c) 2001-2020 (I first learned about CIL in https://people.eecs.berkeley.edu/~necula/Papers/cil_cc02.pdf ) I guess
46.
▲
by
pkhuong
2y ago
> spawn a new database every time they have a new client. I've seen this work great for multitenancy, with sqlite (again, a single beefy server goes a long way). At some point though, you hit niche scaling issues and that's how
47.
▲
by
pkhuong
2y ago
> I'm hesitant to rely on sqlite-rsync right away because it's so new. If you want something less new that only needs an S3-compatible endpoint, there's https://gist.github.com/pkhuong/555be66f5e573a2d
48.
▲
by
pkhuong
2y ago
I believe I first saw this on IACA; uops.info has the measurements for zero-latency inc, add, etc on Alder Lake https://uops.info/html-instr/INC_R64.html . These adds by immediate are nicely closed, so I've been a
49.
▲
by
pkhuong
2y ago
I forgot some first-order methods also solve a projection problem, and I believe I've seen some work on preconditioning there.
50.
▲
by
pkhuong
2y ago
That's how https://github.com/backtrace-labs/verneuil 's read replication is meant to be used. There's a command-line tool to recreate a sqlite DB file from a snapshot's manifest, with an optional l
51.
▲
by
pkhuong
2y ago
First order methods like PDLP tend to warm start much better than interior point. I'm confident Applegate (of Concorde fame, and who worked on huge MIPs at Google when I was there) is thinking about integration in MIP solvers.
52.
▲
by
pkhuong
2y ago
Preconditioning would only apply to approaches like interior point methods, where the condition number quickly approaches infinity.
53.
▲
by
pkhuong
2y ago
I can see a valid reason, specifically for variable-length encodings: big-endian makes it easy to compare compound keys lexicographically without decoding (little-endian can still do it, but everything has to be flipped to read from high to
54.
▲
by
pkhuong
2y ago
x86 is a variable-length encoding where more frequently used instructions tend to have shorter encodings. Thumb doesn't go as far, with only 2 and 4 -byte instructions. You can find old papers on Huffman encoding instructions. More eff
55.
▲
by
pkhuong
2y ago
The purpose of the place system is to support side-effectful macros where programmers don't have to repeat what they mean n times.
56.
▲
by
pkhuong
2y ago
https://root.cern/cling/ now https://clang.llvm.org/docs/ClangRepl.html has grown wrappers like https://github.com/compiler-research/xeus-clang-repl
57.
▲
by
pkhuong
2y ago
The basic logic flags any loop ("back-edge").
58.
▲
by
pkhuong
2y ago
I see a lot of people asking for a real use case. If you follow the reference chain in the first aside, you'll find this blog post of mine https://pvk.ca/Blog/2020/07/07/flatter-wait-free-hazard-poin
59.
▲
by
pkhuong
2y ago
Salad's for the parent/chauffeur.
60.
▲
by
pkhuong
2y ago
It's less accurate.
More ›