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

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

Path: ...!news.mixmin.net!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 - worst memory size
Date: Thu, 11 Apr 2024 22:09:51 -0700
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <86o7afyxnk.fsf@linuxsc.com>
References: <ut3669$21eur$1@i2pn2.org> <86h6h3nvyz.fsf@linuxsc.com> <865xxiok09.fsf@linuxsc.com> <20240319131842.00002138@yahoo.com> <86o7b9ms7d.fsf@linuxsc.com> <20240320115416.00001ab5@yahoo.com> <86zfusltwp.fsf@linuxsc.com> <20240324193352.000062e9@yahoo.com> <86jzlrk0f6.fsf@linuxsc.com> <20240405173033.00006145@yahoo.com> <868r1k1uq8.fsf@linuxsc.com> <20240411152033.00007173@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 12 Apr 2024 07:09:53 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c97bd3546ab5d223656b076d0b7c627f";
	logging-data="2301891"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19JfxVZVLbEUm0vVZdbMiSD6FluonZ0toY="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:C06UOlm2dypCDKbnG11rpKKD8to=
	sha1:ULBWMkwzBjxm6NkHu1CBy6c2XF4=
Bytes: 3163

Michael S <already5chosen@yahoo.com> writes:

> On Wed, 10 Apr 2024 19:47:11 -0700
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> Stack-based methods tend to do well on long skinny patterns and
>> tend to do not as well on fatter patterns such as circles or
>> squares.  The fractal pattern is ideal for a stack-based method.
>> Conversely, patterns that are mostly solid shapes don't fare as
>> well under stack-based methods, at least not the ones that have
>> been posted in this thread, and also they tend to use more memory
>> in those cases.
>
> Indeed, with solid shapes it uses more memory.  But at least in my
> tests on my hardware with this sort of shapes it is easily faster
> than anything else.  The difference vs the best of the rest is
> especially big at 4K images on AMD Zen3 based hardware, but even on
> Intel Skylake which generally serves as equalizer between different
> algorithms, the speed advantage of 2x2 stack is significant.

This comment makes me wonder if I should post my timing results.
Maybe I will (and including an appropriate disclaimer).

I do timings over these sizes:

      25 x 19
      19 x 25
     200 x 200
    1280 x 760
     760 x 1280
    1920 x 1080
    1080 x 1920
    3840 x 2160
    2160 x 3840
    4096 x 4096
   38400 x 21600
   21600 x 38400
   32767 x 32767
   32768 x 32768

with these patterns:

   fractal
   slalom
   rotated slalom
   horizontal snake and vertical snake
   cross in cross
   donut aka ellipse with hole
   entire field starting from center

If you have other patterns to suggest that would be great,
I can try to incorporate them (especially if there is
code to generate the pattern).

Patterns are allowed to include a nominal start point,
otherwise I can make an arbitrary choice and assign one.