Attractive Chaos
attractivechaos.wordpress.com · Personal blog · on HN since 2008
Attractive Chaos is a bioinformatics programmer's blog with benchmarks and C code on hash tables, sorting, matrix multiplication, and language performance.
What HN saysHN commenters point to its hash table library comparison and khash.h, its matrix multiplication post, and its take on the D language.
21HN people shared it
12linked it in comments
14stories submitted
415story points
3 years agolast shared
2008people per year2026
Most-shared posts
- 1Advanced techniques to implement fast hash tables4 people · 180 points · first shared 2018 · 19 comments on HN
- 2Comparison of Hash Table Libraries4 people · 2 points · first shared 2008 · discussion on HN
- 3Performance of Rust and Dart in Sudoku Solving3 people · 106 points · first shared 2013 · 70 comments on HN
- 4Optimizing matrix multiplication in C3 people · 84 points · first shared 2016 · 32 comments on HN
- 5B-tree vs. Binary Search Tree2 people · 17 points · first shared 2008 · 9 comments on HN
- 6An incomplete review of sudoku solver implementations2 people · first shared 2013
- 7Does packed struct hurt performance on x86_64?1 people · 7 points · first shared 2013 · 1 comments on HN
- 8Heap-free and lock-free parallelized C "for" loops1 people · 7 points · first shared 2013 · discussion on HN
- 9Generic programming in C1 people · 7 points · first shared 2011 · discussion on HN
- 10Revisiting hash table performance1 people · 3 points · first shared 2018 · discussion on HN
- 11C API for reading remote files with kurl1 people · 1 points · first shared 2013 · discussion on HN
- 12The K8 JavaScript shell (2011)1 people · 1 points · first shared 2014 · 1 comments on HN
- 13Two interesting polls on programming languages1 people · first shared 2012
- 14Timeline of the d programming language1 people · first shared 2020
- 15Programs1 people · first shared 2017
What HN people wrote when they linked it
attractivechaos · 2024-01-14
> D went from a language that I remember back in 2015 was often promoted on places like reddit and here as a fresh alternative to C++ that was constantly evolving
I wrote a blog post in 2012 about D [1]. In my personal experience, the high point of D was around 2008-2009. It was already declining in popularity in 2012, IMHO, due to intense clashes within the D community and the rise of Go, Rust and C++11 outside the community. D remains one of my favorite languages but I agree with you that Rust, Nim or Zig is the better choice for most programmers today.
[1] https://attractivechaos.wordpress.com/2012/02/28/timeline-of-the-d-pro…
ZoomZoomZoom · 2021-10-18
> I wish this article was more opinionated.
There's the Attractive Chaos blog for you:
https://attractivechaos.wordpress.com/
53x15 · 2019-09-04
I'm the author of Tdoku and maintainer of those benchmarks.
If anyone has a well optimized DLX implementation I'd love to add it to the comparison. The few I've sampled from github were not competitive, but I have no idea how much effort when into them.
This page from 2011 has some comparisons of backtracking and DLX solvers from that era, but it would be interesting to update:
https://attractivechaos.wordpress.com/2011/06/19/an-incomplete-review-…
V__ · 2021-12-17
dottrap · 2017-08-23
Also there is the header-only khash.h [3], complete with benchmarks:
https://attractivechaos.wordpress.com/2008/08/28/comparison-of-hash-ta…
(Also provides kbtree.h, ksort.h, kstream.h, kvec.h)
[3] https://attractivechaos.wordpress.com/programs/
Also there are the stb header-only libraries. There is a hash table implementation buried inside stb.h
[4] https://github.com/nothings/stb
makmanalp · 2016-08-29
OK, a bit more here: https://attractivechaos.wordpress.com/2008/08/28/comparison-of-hash-ta…
vsbuffalo · 2014-03-17
A really nice comparison of just C/C++ hash libraries is http://attractivechaos.wordpress.com/2008/08/28/comparison-of-hash-tab…
Good discussion too. khash.h uses macros for C templating, but is quite fast.
pkolaczk · 2013-07-24
As pointed out in the other comments on this thread, this benchmark benchmarks mostly standard RNG performance, not quality of the code generated by each compiler. Here you've got much more computationally intensive benchmark, showing that D is "as fast as C" like it could be said about Java: http://attractivechaos.wordpress.com/2013/04/06/performance-of-rust-an…
It is close, but Java is just as close, too. Not a tremendous performance advantage that someone would choose one over another for and not something I'd expect from a language marketed as "performance oriented".
barristan · 2013-06-09
In case anyone is looking for other novel ways to solve Sudoku. I wrote a CP language a while back that does pretty fast solving for the right kind of problem [1]. Folks might also find this Sudoku benchmarking blog post interesting [2], it includes links to solutions in a bunch of languages.
1) http://sabrlang.org/sudoku
2) http://attractivechaos.wordpress.com/2011/06/19/an-incomplete-review-o…
ksec · 2013-04-06
yorhel · 2012-03-25
Also an interesting graph from the two polls: http://attractivechaos.wordpress.com/2012/03/24/two-interesting-polls-…
equark · 2011-09-15
> Dart will not be 2x (or more) faster than JS.
Why are you so sure of this? The people involved appear to be big believers that dynamic languages can be extremely performant provided they are designed with the VM in mind. LuaJit proves this out. A simple 1000x1000 matrix multiply in LuaJit is already 20x (not 2x!) faster than V8 and on par with C.
http://attractivechaos.wordpress.com/2011/01/23/amazed-by-luajit/
http://lua-users.org/lists/lua-l/2009-06/msg00071.html
I think far too much emphasis is being placed on whether Dart replaces JS in the browser. Google would gain a huge amount by having a performant server-side language that can be tooled and compiled to JS for the client.