Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #103196

Re: language changes to optimize for speed in qsort?

From Gareth Owen <gwowen@gmail.com>
Newsgroups comp.lang.c
Subject Re: language changes to optimize for speed in qsort?
References <o72ij4$448$1@dont-email.me> <md2a9ch00dm5hrv6dgp86ao0qk048gondb@4ax.com> <d5bab82b-85eb-44b5-a904-0d2e323a8cc5@googlegroups.com> <fjpd9c9u8tjnnvgecikv7rm0upis5uob0b@4ax.com> <eac7bdde-db90-46c5-8594-9b50261cb90d@googlegroups.com>
Date 2017-02-05 13:03 +0000
Message-ID <87a8a0n614.fsf@gmail.com> (permalink)

Show all headers | View raw


Malcolm McLean <malcolm.mclean5@btinternet.com> writes:

> However once league-type data is established, often it is impossible
> or almost impossible for anything to move more than one or two places
> on each pass. Sorting a football league will be done in microseconds 
> even with an N**2 sort of course

Sorting a football league will take microseconds, because football
leagues tend to have 20-30 teams in them.  So, as long as you avoid
bogosort(), it almost certainly doesn't matter. On those occasions when
it does matter (e.g. your league secretary insists on processing match
results using an 16-bit micro running at 1Mhz), the only way to choose
the best algorithm is by measurement on typical data.

If you're using asymptotic analysis to determine how to sort thirty
items, then you do not understand the puropose or limitations of
asymptotic analysis.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

language changes to optimize for speed in qsort? mathog <dmathog@gmail.com> - 2017-02-03 10:36 -0800
  Re: language changes to optimize for speed in qsort? Robert Wessel <robertwessel2@yahoo.com> - 2017-02-03 17:15 -0600
    Re: language changes to optimize for speed in qsort? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-03 16:26 -0800
      Re: language changes to optimize for speed in qsort? Robert Wessel <robertwessel2@yahoo.com> - 2017-02-05 02:58 -0600
        Re: language changes to optimize for speed in qsort? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-05 03:01 -0800
          Re: language changes to optimize for speed in qsort? Gareth Owen <gwowen@gmail.com> - 2017-02-05 13:03 +0000
          Re: language changes to optimize for speed in qsort? Robert Wessel <robertwessel2@yahoo.com> - 2017-02-06 04:30 -0600
        Re: language changes to optimize for speed in qsort? supercat@casperkitty.com - 2017-02-05 10:07 -0800
  Re: language changes to optimize for speed in qsort? supercat@casperkitty.com - 2017-02-03 16:42 -0800
    Re: language changes to optimize for speed in qsort? Ian Collins <ian-news@hotmail.com> - 2017-02-04 13:46 +1300
      Re: language changes to optimize for speed in qsort? supercat@casperkitty.com - 2017-02-03 16:57 -0800
        Re: language changes to optimize for speed in qsort? Keith Thompson <kst-u@mib.org> - 2017-02-03 18:39 -0800
    Re: language changes to optimize for speed in qsort? Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-04 11:28 -0800

csiph-web