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


Groups > comp.lang.javascript > #29880

Re: Bubblesort

Path csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Bubblesort
Date Thu, 10 Mar 2016 22:17:15 +0100
Organization PointedEars Software (PES)
Lines 40
Message-ID <2712500.u9phrr1jX2@PointedEars.de> (permalink)
References <0d68ee6d-8a80-439e-ae04-17743584e2e4@googlegroups.com> <nbbp99$fed$1@dont-email.me> <XnsA5C17A5C66BA1eejj99@194.109.6.166> <086a7397-459b-46e3-b83c-cfc7edf4188a@googlegroups.com> <7b1ee9db-4732-48e1-be7e-37ba62db4c6e@googlegroups.com> <nbc50g$44d$1@news.albasani.net> <2815605.oGPRxZOVvt@PointedEars.de> <nbnur4$4tr$1@news.albasani.net> <1614595.1D9Jq9LFrv@PointedEars.de> <nbskjb$ehr$1@news.albasani.net>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1457644637 8966 eJwNysEBwCAIA8CVUEjEcYDC/iPYex+Ui3WMoGEwS0MRO653mbvssjTeZOIbHKnQ1ZT7t1aXehOjEMY= (10 Mar 2016 21:17:17 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Thu, 10 Mar 2016 21:17:17 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYEBwCAIA7CXZNAWzxGU/09YAqexFQQDg3n8VNWjXL4oJIqe2VLXe8EoB2xjircjz7lfu/kJg9bS/gFH4hTd
Cancel-Lock sha1:N+JLvnc5IR+rFrOw6xlHyaM+hII=
X-NNTP-Posting-Host eJwFwYEBwCAIA7CXVqQtO2cq/H/CEi5BxykqOZxUXEaguwLcT5dr3jDhs6QwMP4q+66tav7+FxAj
Xref csiph.com comp.lang.javascript:29880

Show key headers only | View raw


Stefan Weiss wrote:

> On 03/09/2016 22:04, Thomas 'PointedEars' Lahn wrote:
>> BTW, who would be interested in a sort method that would be able to only
>> sort parts of an array?
> 
> Maybe... what's the use case for this?

I am not certain.  When I was writing my follow-up, it just occurred to me 
that this might be a pretty neat idea (just like digital watches).  Perhaps 
I was thinking of table sections.

If there is only one part, then it is trivial, of course:

  var a = […];
  var partially_sorted =
    a.slice(0, 42).concat(a.slice(42, 47).sort(comparator), a.slice(47));

>>> In Firefox 44, inline arrow functions are noticably slower than the
>>> other variants (about an order of magnitude).
>> 
>> [I did not expect] that – so, are we, in the end, sacrificing performance 
>> for convenient syntax with arrow functions here? –,
> 
> You were right not to expect that... after rearranging my test script
> and upgrading to FF45, I can't reproduce yesterday's results anymore.
> 
> The issue using sort() with inline arrow functions in Firefox still
> exists, but the effect is much smaller when other array methods are
> used. […]
> Apart from this, arrow functions are pretty much on par with traditional
> functions.

ACK.
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

Bubblesort jonas.thornvall@gmail.com - 2016-03-04 02:00 -0800
  Re: Bubblesort "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-04 18:53 +0800
    Re: Bubblesort "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-04 12:01 +0100
      Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 03:03 -0800
      Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 05:15 -0800
        Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 05:41 -0800
          Re: Bubblesort "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-04 21:56 +0800
          Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-04 15:10 +0100
            Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 07:37 -0800
              Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-04 17:08 +0100
            Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 07:50 -0800
            Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 07:54 -0800
              Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-04 17:21 +0100
              Re: Bubblesort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-04 19:26 +0000
                Re: Bubblesort "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-04 23:05 +0100
                Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-05 09:15 -0800
                Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-08 03:43 +0100
                Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-08 02:41 -0800
                Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-08 09:10 -0800
                Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-08 23:34 +0100
                Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-08 23:46 +0100
                Re: Bubblesort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-09 00:16 +0000
                Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-09 02:41 +0100
            Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-08 23:35 +0100
              Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-09 02:38 +0100
                Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-09 22:04 +0100
                Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-10 21:14 +0100
                Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-10 22:17 +0100
                Re: Bubblesort "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-10 22:31 +0100
                Re: Bubblesort Stefan Weiss <krewecherl@gmail.com> - 2016-03-10 23:25 +0100
                Re: Bubblesort "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-11 00:16 +0100
        Re: Bubblesort "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-04 21:59 +0800
          Re: Bubblesort "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-04 17:12 +0100
          Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-05 02:00 +0100
            Re: Bubblesort John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-05 18:39 +0000
            Re: Bubblesort Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-05 17:40 -0800
      Re: Bubblesort "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-04 21:54 +0800
        Re: Bubblesort "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-04 16:59 +0100
    Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 03:04 -0800
      Re: Bubblesort jonas.thornvall@gmail.com - 2016-03-04 03:55 -0800
    Re: Bubblesort Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-05 00:01 +0100
      Re: Bubblesort Aleksandro <aleksandro@gmx.com> - 2016-03-06 18:41 -0300

csiph-web