This kind of blog posts are super interesting and depressing at the same time :) makes me question my programing skills. Almost all of the things mentioned here are over my head. Thanks for sharing though, very interesting
Nibble Sort
11–16 of 16 posts
Re: Nibble Sort
#12I have a short Python script to generate sorting networks (and diagrams like the one found in the post): https://github.com/ysangkok/python-sorting-networks/blob/mas... I was a bit disappointed to see no code in this blog post for the algorithms used to generating the pairs. Is there are templated C++ library for this?
Re: Nibble Sort
#13This kind of blog posts are super interesting and depressing at the same time :) makes me question my programing skills. Almost all of the things mentioned here are over my head. Thanks for sharing though, very interesting
Sometimes programming feels like: "Interesting work, useful work. Pick one". People who get to do both are privileged indeed, the rest of us sit around feeling either bored or useless. I'm thankful at least, in contrast to several friends who suffer from depression and are not prone to nerd sniping, that, for me, these two states are almost mutually exclusive.
Re: Nibble Sort
#14Re: Nibble Sort
#15Upon seeing the description of the problem, my first thought was "use a sorting network" too, although I'd probably try to use fewer registers...
Re: Nibble Sort
#16How does it scale?
These solutions do not scale at all. Even with tweaks, they could not sort 18 nibbles (or 32 nibbles). But they are very interesting, and these kinds of tricks do find some practical use in things like video codecs.
Which would scale at O(n*log(n)). Which is asymptotically optimal IIRC.