Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regexp: Use []bool instead of map[uint32]bool in makeOnePass #19984

Closed
atetubou opened this issue Apr 15, 2017 · 1 comment
Closed

regexp: Use []bool instead of map[uint32]bool in makeOnePass #19984

atetubou opened this issue Apr 15, 2017 · 1 comment

Comments

@atetubou
Copy link
Contributor

atetubou commented Apr 15, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +560f60dc18 Sat Apr 15 11:55:09 2017 +0900 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tikuta/go"
GORACE=""
GOROOT="/Users/tikuta/git/go"
GOTOOLDIR="/Users/tikuta/git/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gl/sc9m8rn51hb14_dkfy6hg6tm00bk9x/T/go-build948972486=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

I found that regexp package uses map in makeOnePass function where array is sufficient.

What did you expect to see?

Using array instead.
Gain better performance.

What did you see instead?

Using map.

@gopherbot
Copy link

CL https://golang.org/cl/40890 mentions this issue.

@atetubou atetubou changed the title regexp: Use []bool instead of map[utint32]bool in makeOnePass regexp: Use []bool instead of map[uint32]bool in makeOnePass Apr 15, 2017
@golang golang locked and limited conversation to collaborators Apr 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants