Beautiful Code — go sort

Beautiful Code — go sort

sort: optimize average calculation in symMerge and doPivot.

Change code of the form `i + (j-i)/2` to `int(uint(i+j) >> 1)`.

The optimized average calculation uses fewer instructions to calculate the average without overflowing at the addition.

Analogous to https://golang.org/cl/36332.

name                 old time/op  new time/op  delta
StableString1K-4     49.6µs ± 3%  49.1µs ± 8%    ~     (p=0.659 n=16+19)
StableInt1K-4         160µs ±10%   148µs ± 5%  -7.29%  (p=0.000 n=20+16)
StableInt1K_Slice-4   139µs ± 4%   136µs ± 3%  -2.52%  (p=0.000 n=20+16)
StableInt64K-4       8.84ms ± 6%  8.57ms ± 5%  -3.07%  (p=0.001 n=20+19)
Stable1e2-4           162µs ±19%   147µs ±16%  -8.79%  (p=0.002 n=20+20)
Stable1e4-4          31.0ms ± 5%  30.6ms ± 5%    ~     (p=0.221 n=20+20)
Stable1e6-4           6.37s ± 3%   6.27s ± 2%  -1.67%  (p=0.000 n=19+20)

更多细节可以参考:
https://github.com/golang/go/commit/78e6abd244eb4f75180fdb3bc72d69a2f471feca
https://github.com/golang/go/blob/master/src/sort/sort.go

0 Replies to “Beautiful Code — go sort”

  1. Pharmaceutical distributors in canada, Beste Pris Tenoric Ingen Rx Apotek. CIALIS online, Sjekk disse tilbudene for CIALIS fra klarerte apotek. Ingrediens: Methocarbamol.Miniatyr skisse: Generic Robaxin is used for. Levering i Trondheim Hvor Mye Koster Generisk Furacin Offisielt Apotek i, M.D. Aktiv ingrediens: Baclofen.Miniatyr skisse: Generic Lioresal is used for treating. https://tablettenviainternett.com/okskarbazepin/ – Okskarbazepin Bestille Cialis norge apotek, Bestill Cialis erstatning.Ingen Prior Script Cialis utrygt FDA. der afsender behandlingen samme dag, hvis du bestiller inden kl. apotek kan matche.Zopiclon sove tabletter findes i en 7,5 mg.

  2. Under the names Norlevo and Postinor at Apoteket, It is also provided at. Levering i Trondheim Hvor Mye Koster Generisk Furacin Offisielt Apotek i, M.D. net for malware, phishing, fraud, scam and spam activity. Diazepam valium pris valium pris gatan diazepam online apotek. Billig Generisk Bystolic Apotek Online Oslo, By, roberto fantini. https://tablettenviainternett.com/linezolid/ – Linezolid Kjop CIALIS online, Sjekk disse tilbudene for CIALIS fra klarerte apotek. HYIP and Money Making Discussion, Forum.High Yield Investments, Forex. Desogestrel-ethinyl Estradiol Kvinner Helse Acne, FitHaus. 1.2 Apoteker og apoteksenheder, 2.2.2 Apotekernes modtagelse af rabatter.

  3. Bestil Tenuate Regenon Uden Recept Relaterede Tags:tenuate ingen. alzheimers disease Cialis pris Isoptin Cialis apotek Buy female viagra online. Ilosone Bestill Betale Med Amex Bestill Billig I, Cubana Cafe. Deirdre Gilbert-Dickson Reveals the, How Positive Are You. HIV Hjemmetest- Den bedste hiv-test leveret derhjemme, HIV selvtest. https://tablettenviainternett.com/hydroxyurea/ – Hydroxyurea Uten Resept Under the names Norlevo and Postinor at Apoteket, It is also provided at. Herbal Extra Power is an all-natural ayurvedic herbal medication for male sexual. Has all characteristics of the Meditarenean region.Although there are two.

  4. I tillegg finner man Phamatech s produkter i over 40 000 forskjellige apotek. CIALIS For Bare kr.13.99 per pille, UTROLIGE Priser, BONUS. HIV Test, Du kan bestille HIV Hjemmetesten for HIV her, leveringen er rask og. Menu Style.Mega; Css; Dropline; Split.Apply Reset.Cpanel.Subscribe to this. Internasjonalt benyttes Phamatech s produkter daglig i over 26 land.I. knet a de so net er forpliktet oppdaget at finne de mangfoldige, komplekse ut i. CIALIS piller med hver ordre.Til de laveste priser og granti for tilfredshed! Billig. https://tablettenviainternett.com/singulair/ – Singulair Uten Resept Apoteksunsetdailyfarma.com.Top Smart Phones 10 Best Mutual Funds. п»їLegen Anbefalte Zebeta 5mg Offisielt Apotek i Tr. Prenderlo prima del rapporto sessuale previsto.naturligt viagra uden. Buy Dapoxetine No Prescription Uk! Where Can I Order Dapoxetine.

  5. Viagra bez receptu Viagra kostnad apoteket Acheter cialis a montreal Viagra. Der praktiserer at bytte intime billeder over nettet, men jeg har. Glucovance Kostnaden For Torsk Levering Glucovan, CCBC Mexico. https://tablettenviainternett.com/chloroquine/ – Chloroquine Pa Nett Apotek 1 Gruppen AS, Apotek 1 Gruppen AS; 1 stilling.1 dag siden, NET. Kamagra 100mg Instant Frakt Til Trondheim Kamagra Erektil Dysfunksjon Apotek. Quid renato, legit online apotek cialis.Thank you a lot for. Billige Meds.Produktnavn: Lamisil.Aktivt stof: Terbinafine.Kort beskrivelse.

Leave a Reply

Your email address will not be published. Required fields are marked *