Tuesday, January 10, 2006

Haskell quicksort อีกที

post เดิมที่พูดเรื่อง Pure functional programming with Haskell
ลืมลง quote ที่เขาเปรียบเทียบ c code กับ haskell
The C quicksort uses an extremely ingenious technique, invented by Hoare, whereby it sorts the array in place; that is, without using any extra storage. As a result, it runs quickly, and in a small amount of memory. In contrast, the Haskell program allocates quite a lot of extra memory behind the scenes, and runs rather slower than the C program.
In effect, the C quicksort does some very ingenious storage management, trading this algorithmic complexity for a reduction in run-time storage management costs.

เลือก tool ให้เหมาะกับงาน !

Related link from Roti

No comments: