[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: James Youngman
Subject: Re: ARG_MAX
Date: Thu, 26 Apr 2007 17:05:47 +0100

On 4/26/07, address@hidden <address@hidden> wrote:
It looks slick, but I'm not sure whether that isn't too much overhead
for the whole thing...  after all the different strategies really only
differ in one algorithm that has the same input and output.

The overhead lies in the function pointers -- why bother with them?
All algorithms (and we only have two in fact, and one of them is
distinctly better than the other) differ only in one function and will
happily operate with the same measure(), suggest_split(), ... functions
as well as the data structure you proposed.

So I'm not really getting the point of this indirection. :)

Separation is, in general, a good idea, though, and very C-like.

Ack.   At some point, someone will want to test a different strategy,
and may need to use a different data structure.  I'm not dogmatic
about keeping that level of direction, you can implement the features
you need and leave it at that.   If anyone else needs anything more
complex, they could always implement it later, after all.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]