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

Just need to check the last byte. #89

Merged
merged 1 commit into from Oct 9, 2022
Merged

Conversation

robxyy
Copy link
Contributor

@robxyy robxyy commented Oct 9, 2022

Refer: #71 #75

old:

go test -bench 'FromString*' -benchmem
goos: darwin
goarch: arm64
pkg: github.com/rs/xid
BenchmarkFromString-10    	445015340	         2.618 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/rs/xid	1.807s

new:

go test -bench 'FromString*' -benchmem
goos: darwin
goarch: arm64
pkg: github.com/rs/xid
BenchmarkFromString-10    	521384266	         2.304 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/rs/xid	1.556s

@rs rs merged commit 1b855c3 into rs:master Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants