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


Groups > comp.lang.javascript > #34235

Re: Sort at least 5 times faster then native and quicksort

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Sort at least 5 times faster then native and quicksort
Date Sun, 29 Oct 2017 14:37:21 +0000
Organization A noiseless patient Spider
Lines 26
Message-ID <87tvyit3z2.fsf@bsb.me.uk> (permalink)
References <8c8816a1-0e4f-4bb4-8a52-94f434e4d599@googlegroups.com> <87d156upbm.fsf@bsb.me.uk> <27cc47e1-2ed9-4e79-84e8-923454a7cff5@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
Injection-Info reader02.eternal-september.org; posting-host="b252f5705e435813dbfff633d4cae81b"; logging-data="9422"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R7qNRh9sxkB5d5uu0anDsm4+ZVmkuX3U="
Cancel-Lock sha1:zzgy3GljasONfr8S2tQWoT47OnY= sha1:hVaWHyWuXmgRd0g4px5JMdRK0Dg=
Xref csiph.com comp.lang.javascript:34235

Show key headers only | View raw


jonas.thornvall@gmail.com writes:

> Den söndag 29 oktober 2017 kl. 13:10:59 UTC+1 skrev Ben Bacarisse:
>> jonas.thornvall@gmail.com writes:
<snip>
>> > But usual there is some weird aspect i can't find out what i do wrong,
>> > if you set startrange for the random numbergererator higher then 0
>> > values will turn up undefined i don't get it.
>> 
>> You don't zero the right number of elements in countval.  This, in turn,
>> is because you do
>> 
>>   number=Math.floor(Math.random() * end) + start;
>> 
>> so the numbers range from start to start+end-1.
<snip>
> Can you understand the bug that occur when the sample range start is
> not zero Ben?

Yes.  What did you not understand in the explanation?

(Please try trimming quoted material in your posts.)

<snip>
-- 
Ben.

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


Thread

Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-28 21:27 -0700
  Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-28 21:41 -0700
  Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 03:53 -0700
    Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 04:33 -0700
  Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 04:37 -0700
  Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 12:10 +0000
    Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 05:53 -0700
      Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 06:01 -0700
      Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 14:47 +0000
        Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 08:13 -0700
          Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 15:46 +0000
            Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 08:49 -0700
              Re: Sort at least 5 times faster then native and quicksort Tim Streater <timstreater@greenbee.net> - 2017-10-29 16:16 +0100
            Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 08:52 -0700
            Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 08:58 -0700
              Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 16:18 +0000
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 09:36 -0700
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 09:48 -0700
                Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 18:02 +0000
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 20:51 -0700
                Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-30 09:31 +0000
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:14 -0700
                Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-30 10:31 +0000
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:35 -0700
                Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-30 14:19 +0000
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-11-02 14:38 -0700
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-11-02 14:42 -0700
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:44 -0700
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:50 -0700
                Re: Sort at least 5 times faster then native and quicksort Wally W. <ww84wa@aim.com> - 2017-10-30 06:40 -0400
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:48 -0700
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:32 -0700
                Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-30 03:37 -0700
        Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 08:35 -0700
    Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 06:07 -0700
      Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 14:37 +0000
    Re: Sort at least 5 times faster then native and quicksort jonas.thornvall@gmail.com - 2017-10-29 06:23 -0700
      Re: Sort at least 5 times faster then native and quicksort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-10-29 14:50 +0000

csiph-web