Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(422)

Issue 7305063: code review 7305063: bytes: minor optimization to lastIndexFunc (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by bradfitz
Modified:
12 years, 5 months ago
Reviewers:
CC:
golang-dev, dave_cheney.net
Visibility:
Public.

Description

bytes: minor optimization to lastIndexFunc Before and after: BenchmarkTrimSpace 20000000 81.3 ns/op BenchmarkTrimSpace 50000000 58.0 ns/op (most whitespace trimming is ASCII whitespace) Same optimization appeared a handful of other places in this file, but not here.

Patch Set 1 #

Patch Set 2 : diff -r 835db789f270 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 835db789f270 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 832e7ed7e6b2 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -1 line) Patch
M src/pkg/bytes/bytes.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M src/pkg/bytes/bytes_test.go View 1 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 3
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 5 months ago (2013-02-07 22:26:30 UTC) #1
dave_cheney.net
LGTM. Results for linux/arm nexus7 benchmark old ns/op new ns/op delta BenchmarkTrimSpace 588 482 -18.03%
12 years, 5 months ago (2013-02-07 23:01:12 UTC) #2
bradfitz
12 years, 5 months ago (2013-02-08 00:00:10 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=da26671f086a ***

bytes: minor optimization to lastIndexFunc

Before and after:
BenchmarkTrimSpace  20000000   81.3 ns/op
BenchmarkTrimSpace  50000000   58.0 ns/op

(most whitespace trimming is ASCII whitespace)

Same optimization appeared a handful of other places
in this file, but not here.

R=golang-dev, dave
CC=golang-dev
https://codereview.appspot.com/7305063
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b