Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Immutable Datastructures with good Sharing Date: Sat, 05 Nov 2011 17:20:37 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <4eb59a7e$0$292$14726298@news.sunsite.dk> <4eb59ed8$0$288$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 6 Nov 2011 00:20:38 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="7021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hy2w0XOu6iDvxlmH8OAyc+nWyWTRYlHo=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: Cancel-Lock: sha1:PcjVI4OtlK+bIvLYB3z+Me/TNTw= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9630 On 11/5/2011 1:41 PM, Jan Burse wrote: > Arne Vajhøj schrieb: >> >> How do you know that the clone solution use more CPU than >> the solution you are looking for now?? > > It has been proven for the stack. I'd like to see that proof. I think this is the fundamental disconnect most people are having on this thread. What is an immutable stack actually good for? There's nothing that comes to my mind. > But a friend of mine implemented the same application, > and he has a different solution for the queue and > is orders of magnitude faster. Cloning or copying has got to be slow. I'd bet this is why your solution is slow, even if you don't realize it.