Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Bitonic sort Date: Thu, 10 Apr 2014 19:29:29 -0400 Organization: Aioe.org NNTP Server Lines: 23 Message-ID: References: <534678a1$0$2861$e4fe514c@news2.news.xs4all.nl> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:29516 On Thu, 10 Apr 2014 06:55:59 -0400, Hans Bezemer wrote: > This implementation does quite a bit of > stack trashing - but uses no locals. So, Marcel posts a solution with locals! :-) As for stack trashing, are you saying you don't have the following Forth words? 2DUP 2SWAP -2ROT -ROT E.g., I think you may have missed optimizing some of the stack sequences: over over --> 2dup > r rot r> swap --> -rot 2swap swap over 2>r 2swap 2r> --> over 2swap -2rot Rod Pemberton