Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Challenge

2005-06-09 by Joel Kolstad

--- In AVR-Chat@yahoogroups.com, Peter Harrison <peter_harrison@n...> 
wrote:
> There is a fairly classic solution described on this page:
> http://netghost.narod.ru/gff/graphics/book/ch06_04.htm
> It does not look fast but, as far as I recall, it is. 

It appears to require 6 shifts, six ANDs, and 5 ORs... seems unlikely 
it would be faster than the "straightforward" implementation?  It looks 
like a case of someone trying to be clever after they learned why a 
quicksort is better than something like a bubble sort (what he does is 
swap bits 0/1, 2/3, 4/5, 6/7... then 0-1/2-3, 4-5/6-7, and finally 0-
3/4-7).  The problem is that with only 8 bits there's not any speedup 
yet that I can see -- just as smart general purpose sorting routines 
will revert to something like a bubble sort of lists of less than, say, 
10 items!

---Joel Kolstad

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.