Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #9896

Re: My latest magnum opus!

From Andrey Tarasevich <andreytarasevich@hotmail.com>
Newsgroups comp.lang.c
Subject Re: My latest magnum opus!
Date 2011-09-02 09:21 -0700
Organization A noiseless patient Spider
Message-ID <j3qvpe$sep$1@dont-email.me> (permalink)
References <4E60142A.575D@mindspring.com> <j3palv$5tj$1@dont-email.me>

Show all headers | View raw


On 9/1/2011 6:13 PM, Eric Sosman wrote:
> On 9/1/2011 7:24 PM, pete wrote:
>> /* BEGIN block_swap_test.c */
>> [...]
>
>       Jon Bentley tackled this problem in one of his "Programming
> Pearls" columns in CACM, years and years ago.  IIRC, he reported
> that he had seen manymanymany attempts to solve it "efficiently"
> with clever analysis of which block was the larger, and by how much,
> and so on and so forth.

The primary point he makes in PP about this problem is that it happens 
to be one of those problems that demonstrate pretty well how 
hardware-specific efficiency considerations can trump any abstract 
algorithmic efficiency considerations. The most efficient algorithm in 
terms of number of moves (the Juggling algorithm) performs the poorest 
among the three algorithms considered in the book (the recursive 
approach used by the OP is also included). This is, of course, not 
unusual for a problem dealing with relocation of continuous memory blocks.

--
Best regards,
Andrey Tarasevich

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-01 19:24 -0400
  Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-01 21:13 -0400
    Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-01 22:29 -0400
      Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-01 22:58 -0400
        Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-02 00:41 -0400
    Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-02 00:53 -0400
    Re: My latest magnum opus! cri@tiac.net (Richard Harter) - 2011-09-02 05:39 +0000
      Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-02 02:59 -0400
      Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-02 08:21 -0400
        Re: My latest magnum opus! cri@tiac.net (Richard Harter) - 2011-09-02 13:39 +0000
          Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-02 20:53 -0400
            Re: My latest magnum opus! James Dow Allen <jdallen2000@yahoo.com> - 2011-09-03 03:18 -0700
            Re: My latest magnum opus! cri@tiac.net (Richard Harter) - 2011-09-03 17:16 +0000
    Re: My latest magnum opus! Andrey Tarasevich <andreytarasevich@hotmail.com> - 2011-09-02 09:21 -0700
  Re: My latest magnum opus! ImpalerCore <jadill33@gmail.com> - 2011-09-06 06:51 -0700
    Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-06 18:36 -0400
    Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-06 21:04 -0400

csiph-web