Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <utbv3l$qed7$2@dont-email.me>
Deutsch   English   Français   Italiano  
<utbv3l$qed7$2@dont-email.me>

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

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Malcolm McLean <malcolm.arthur.mclean@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: filling area by color atack safety
Date: Tue, 19 Mar 2024 12:06:13 +0000
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <utbv3l$qed7$2@dont-email.me>
References: <ut3669$21eur$1@i2pn2.org> <ut4020$2s8ov$1@dont-email.me>
 <ut4b09$2uhpm$1@dont-email.me> <ut4cnc$2ut2t$1@dont-email.me>
 <ut70b4$3itvb$1@dont-email.me> <20240317182520.00002390@yahoo.com>
 <20240317193908.00002634@yahoo.com> <86le6fo09e.fsf@linuxsc.com>
 <uta2g5$amps$1@dont-email.me> <86wmpyn44y.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Mar 2024 12:06:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7afaabf9fdb4883652af28e583b6382d";
	logging-data="866727"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18zVaWDK9is5yWm52vxCT2XlSu9d5NCP/E="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3bRjUqH3oILXyQ7hxmgp/8yS3iQ=
Content-Language: en-GB
In-Reply-To: <86wmpyn44y.fsf@linuxsc.com>
Bytes: 2509

On 19/03/2024 06:10, Tim Rentsch wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> 
>> On 18/03/2024 18:36, Tim Rentsch wrote:
>>>
>>>
>>> It doesn't scale well.  In particular worst case performance
>>> scaling is worse than O(N) (as determined experimentally, not
>>> theoretically).
>>
>> Is that because the queue is being memmoved instead of using a
>> circular buffer when it gets towards the end?
> 
> I'm sure I don't know, and I'm astonished that you would ask.
> It's your code after all.  IMO it should simply be thrown out and
> re-written;  it pains me just to look at it, let alone to try to
> understand or fix it.

Yes, but I wrote it years ago. I can't remember why the value of 256 
pixels was put in. But I do remember why the queue isn't very efficient 
- for the small images I expected to be processed, I judged that the 
added complexity of maintaining a circular queue wouldn't be worth it, 
given that I wanted the routine to be leaf. However if you can somehow 
trigger catastrophic big O behaviour, it won't be a surprise.

-- 
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm