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

replace log. with fmt #59

Open
komuw opened this issue Oct 23, 2017 · 0 comments
Open

replace log. with fmt #59

komuw opened this issue Oct 23, 2017 · 0 comments

Comments

@komuw
Copy link
Owner

komuw commented Oct 23, 2017

log package synchronizes writes; https://golang.org/src/log/log.go#L134

func main() {
	for index := 0; index < 100000; index++ {
		fmt.Println("a")
	}
}

is faster than

func main() {
	for index := 0; index < 100000; index++ {
		log.Println("a")
	}
}
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

No branches or pull requests

1 participant