Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: w.clodius@icloud.com (William Clodius) Newsgroups: comp.compilers Subject: Re: sorting performance, Add nested-function support in a language the based on a stack-machine Date: Sat, 24 Mar 2018 23:25:21 -0600 Organization: A noiseless patient Spider Lines: 13 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <18-03-096@comp.compilers> References: <6effed5e-6c90-f5f4-0c80-a03c61fd2127@gkc.org.uk> <18-03-042@comp.compilers> <18-03-047@comp.compilers> <18-03-075@comp.compilers> <18-03-077@comp.compilers> <18-03-090@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="56193"; mail-complaints-to="abuse@iecc.com" Keywords: performance, comment Posted-Date: 25 Mar 2018 06:46:11 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2025 Martin Ward wrote: > > [Give or take the detail that bubble sort is never the right algorithm > since insertion sort is shorter and faster, I agree. -John] I believe that bubble sort is faster if the data is usually presorted. The Unicode consortium describes the sorting of codepoints to forn the normalization forms, because the initial decomposition process usually results in an ordering that is usually in or close to the desired order. [It's the reverse. Insertion sort is O(N) if the list is already sorted. See http://www.differencebetween.com/difference-between-bubble-sort-and-vs-insertion-sort/ -John]