Deutsch   English   Français   Italiano  
<86bk79m10l.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: filling area by color atack safety
Date: Wed, 20 Mar 2024 07:27:38 -0700
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <86bk79m10l.fsf@linuxsc.com>
References: <ut3669$21eur$1@i2pn2.org> <86h6h3nvyz.fsf@linuxsc.com> <865xxiok09.fsf@linuxsc.com> <20240319131842.00002138@yahoo.com> <utbuk3$qed7$1@dont-email.me> <20240319191859.00004bc8@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="7a780175fd21d30328a8a78d1217a04c";
	logging-data="1622584"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18LfdZJwF6qZQM4RU8usaTu6B5Vg/fZ61o="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:LuPP5HIB5P7MGh0uF7k/riyOCrs=
	sha1:PTZwqCh+yl8zhc8ZPIDW6LT/p2w=
Bytes: 2758

Michael S <already5chosen@yahoo.com> writes:

> On Tue, 19 Mar 2024 11:57:53 +0000
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
>
>> On 19/03/2024 11:18, Michael S wrote:
>>
>>> On Mon, 18 Mar 2024 22:42:14 -0700
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>>
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>
>>>> Here is the refinement that uses a resizing rather than
>>>> fixed-size buffer.

[...]

> I did a little more investigation gradually modifying Tim's code
> for improved performance without changing the basic principle of
> the algorithm. [...]

I appreciate your doing this.  I developed independently a
couple of versions along similar lines.

> So far, this algorithm is fastest among all "local" algorithms
> that I tried.  By "local" I mean algorithms that don't try to
> recolor more than one pixel at time.
>
> "Non-local" algorithms i.e. yours and my recursive algorithm that
> recolors St. George cross, are somewhat faster, [...].

I was confused by this statement at first but now I see that
"yours" refers to Malcolm's algorithm.

> The nice thing about Tim's method is that we can expect that
> performance depends on number of recolored pixels and almost
> nothing else.

One aspect that I consider a significant plus is my code never
does poorly.  Certainly it isn't the fastest in all cases, but
it's never abysmally slow.

> The second nice thing is that it is easy to understand.  Not as
> easy as original recursive method, but easier than the rest of
> them.
>
> If you or somebody else is interested, here is [micro]optimized
> variant:  [...]

Good show.  I will try to get my latest version posted soon.