Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aappleby
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
511.
▲
by
aappleby
8y ago
Also, there is nothing magic about his fibonacci constant. Any large odd constant with roughly half the bits set at random will do the same thing.
512.
▲
by
aappleby
8y ago
Don't do this. Use a real hash function that guarantees a highly random distribution, make your hash tables power-of-two sized, and map from hash value to table index using (hash & (size-1)). The fibonacci constant thing will help
513.
▲
by
aappleby
8y ago
"The Open Policy Agent (OPA) is an open source, general-purpose policy engine that enables unified, context-aware policy enforcement across the entire stack." To someone who doesn't already know what a "policy engine&quo
514.
▲
by
aappleby
9y ago
Also order-of-magnitude questions about cpu vs gpu perf (arithmetic, special functions, memory bandwidth and latency)
515.
▲
by
aappleby
9y ago
Should add "write me a pseudocode vertex shader and fragment shader", and a question or two about the order of magnitude costs for switching uniforms/buffers/framebuffers/shaders.
516.
▲
by
aappleby
9y ago
Broad statistical tests are good enough for most all non-crypto RNGs - once you pass DieHarder you're probably good enough for practially all common RNG uses. Breaking crypto RNGs is a subtle enough art that having a standardized set o
517.
▲
by
aappleby
9y ago
The wikipedia page might be a bit misleading - there's a 128-bit murmur3 that uses 32-bit math (works well on most every processor), and a 128-bit murmur3 that uses 64-bit math (much faster on 64-bit processors, much slower on 32-bit o
518.
▲
by
aappleby
9y ago
I was going to ask if he'd run it through SMHasher, but... yeah, clearly not. -Austin (author of murmurhash/smhasher)
519.
▲
by
aappleby
9y ago
Really interesting analysis, but constraining their keys to 64-bit integers and using 'hash functions' that only accept 64-bit integers as input skews the results away from real-world use cases. In practice I've found that a
520.
▲
by
aappleby
10y ago
Oops, it's not a handheld though...
521.
▲
by
aappleby
10y ago
Uzebox, though it's a tiny bit dated.
522.
▲
by
aappleby
10y ago
Wrote this a while back but didn't get much feedback - might be helpful if you know more Javascript than Scheme. https://medium.com/@tanjent/refactoring-out-a-y-combinator-9...
523.
▲
by
aappleby
10y ago
Take a look at the tests in SMHasher, they indirectly spell out a lot of what makes a hash "good" (though not all the tests are particularly readable).
524.
▲
by
aappleby
10y ago
Making a fast, good hash function isn't too hard now, so some sort of "provable key-independent collision resistance" is definitely the next thing that needs to be worked on. That said, I haven't really looked into the t
525.
▲
by
aappleby
10y ago
Negligible, a few tens of cycles of extra overhead.
526.
▲
by
aappleby
10y ago
Actually, just noticed a minor issue - since there's no intermixing between the four lanes and the diffuse() function is the same for all of them, if any of the IVs match then I can swap all the blocks in those lanes and get the same h
527.
▲
by
aappleby
10y ago
Looks like a pretty straightforward 64-bit block hash unrolled 4 times. I'd prefer a bit more assymetry in the diffuse() method, but since it passes SMHasher it's probably OK. I wonder how the Rust version compares with plain-jane
528.
▲
by
aappleby
10y ago
class CSectionOfSingleMaterialDrawableObjectBuilder { ... };
529.
▲
Refactoring out a Y Combinator
(medium.com)
1 points
by
aappleby
10y ago
|
0 comments
530.
▲
by
aappleby
10y ago
If you can only hash data a byte at a time, you have bigger problems. ;) I have no real suggestions, but it would be trivial to feed Murmur one byte per loop iteration and then ditch the 'tail' section.
531.
▲
by
aappleby
10y ago
It'd be interesting to see how the 128-bit Murmur versions compare. Something not mentioned in the "Quality" section is that FNV and djb2 produce may produce decent results on words/filenames/source code, but they c
532.
▲
by
aappleby
10y ago
Imagine that I visit a cloning facility that can flawlessly duplicate a human, memories and all. The techs there put me in a medical gown and sedate me, and a while later I wake up in an empty room. Without any additional information, I hav
533.
▲
by
aappleby
10y ago
To clarify, I tried to do something like this back in the 90's and it was _not_ worth the effort. Using something like Google's Protocol Buffers or a similar system where you generate a standard serialization backend for all the p
534.
▲
by
aappleby
10y ago
"is a bad idea".
535.
▲
by
aappleby
10y ago
Common ones from when I started writing video games in C in the 90's - * Write malloc() and free(). * Write a gzip decompressor. * Write a triangle rasterizer and use it to draw a spinning cube on the screen. Each of those is a decent
536.
▲
by
aappleby
10y ago
I don't see anything in the Indiegogo page that shows that he's designed a chip before, and the github link goes to someone else's repo. Googling his name turns up a blog here - http://blog.the-leviathan.ch/
537.
▲
by
aappleby
10y ago
This is a fabulous tool for exploring micro-optimizations across a range of CPUs. I've used it for investigating how some inner loops get pipelined across AVR, ARM+Thumb, ARM32, ARM64, PowerPC, x86-32, and x86-64 processors.
538.
▲
by
aappleby
10y ago
Hmm, that's probably also a good place to start an analogy about code maintenance. Weed by hand first, then weed using good tools, then automate your weeding if things get out of hand.
539.
▲
by
aappleby
10y ago
My wife has been teaching herself to program for the last year - one of her big challenges has been understanding when to hack on a problem until it's solved versus when to go looking for sharper tools. She found this analogy quite hel
540.
▲
“The Code Lumberjacks” – a simple analogy about how effective programmers think
(docs.google.com)
7 points
by
aappleby
10y ago
|
3 comments
More ›