1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:44:40 -07:00
go/src
Martin Möhrmann 76cc881ef0 sort: simplify rotate and reduce calls to it
Move the checks for empty rotate changes
from the beginning of rotate to the callers.

Remove additional variable p used instead of existing m with same value.

Remove special casing of equal ranges (i==j) to exit early as no
work is saved vs checking (i!=j) and  making a single
swapRange call if this is false.

benchmark                   old ns/op      new ns/op      delta
BenchmarkStableString1K     417195         425218         +1.92%
BenchmarkStableInt1K        126661         124498         -1.71%
BenchmarkStableInt64K       10365014       10417438       +0.51%
BenchmarkStable1e2          132151         130648         -1.14%
BenchmarkStable1e4          42027428       40812649       -2.89%
BenchmarkStable1e6          8524772364     8430192391     -1.11%

Change-Id: Ia7642e9d31408496970c700f5843d53cc3ebe817
Reviewed-on: https://go-review.googlesource.com/2100
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 23:21:04 +00:00
..
archive
bufio
builtin
bytes
cmd go/build: add variable expansion to cgo lines 2014-12-23 20:35:49 +00:00
compress compress/bzip2: s/repeat_power/repeatPower/ 2014-12-19 01:29:00 +00:00
container
crypto crypto/tls: change default minimum version to TLS 1.0. 2014-12-18 19:49:41 +00:00
database/sql
debug all: power64 is now ppc64 2014-12-05 19:13:20 -05:00
encoding encoding/binary: check for unsigned integers in intDataSize. 2014-12-22 20:14:59 +00:00
errors
expvar
flag flag: Check for Set error 2014-12-22 00:17:07 +00:00
fmt fmt: fix bug in scanning of hex strings 2014-12-22 04:08:32 +00:00
go go/build: add variable expansion to cgo lines 2014-12-23 20:35:49 +00:00
hash all: power64 is now ppc64 2014-12-05 19:13:20 -05:00
html
image image/draw: fix crash in clip 2014-12-20 06:00:38 +00:00
index/suffixarray
internal/syscall
io
lib9
libbio
liblink liblink: code for debugging bad returns 2014-12-22 22:43:48 +00:00
log
math math/rand: fix example_test to show with the correct method 2014-12-23 17:24:24 +00:00
mime mime/multipart: moved some code to mime/internal/quotedprintable 2014-12-23 19:30:02 +00:00
net net/http/cgi: Correctly pass down the REMOTE_PORT value for CGI requests. 2014-12-23 01:33:26 +00:00
os os: handle the sticky bit separately for *BSD and Solaris 2014-12-17 16:07:28 +00:00
path path/filepath: remove named result parameter for VolumeName 2014-12-18 16:05:07 +00:00
reflect reflect: more function layout tests 2014-12-23 19:57:56 +00:00
regexp regexp/syntax: Clarify comment of OpAnyCharNotNL. 2014-11-11 18:52:07 -08:00
runtime runtime: fix exit on Plan 9 2014-12-23 18:54:39 +00:00
sort sort: simplify rotate and reduce calls to it 2014-12-23 23:21:04 +00:00
strconv
strings
sync all: merge dev.garbage (d1238958d4ae) into default branch 2014-12-05 20:34:45 -05:00
syscall syscall: fix the deprecated way of parsing routing message on openbsd 2014-12-22 23:42:33 +00:00
testing testing: style change: omit unnecessary new 2014-12-20 01:40:11 +00:00
text
time
unicode
unsafe
all.bash
all.bat
all.rc
androidtest.bash
clean.bash
clean.bat
clean.rc
make.bash build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
make.bat build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
Make.dist
make.rc
nacltest.bash
race.bash
race.bat
run.bash build: give freebsd longer to run tests 2014-12-23 04:19:41 +00:00
run.bat build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
run.rc
sudo.bash