We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
go version
go version go1.8.3 linux/amd64
go env
linux, amd64
A simple for loop,
package main import "fmt" func main(){ for i := 0; i < 1000000; i++ { fmt.Println(i) } }
time taken to be around, 1 or 2 seconds
time taken is 6 seconds.
I have written the same in python,
for i in range(1,1000000) print(i)
time taken for python is around 2.3 seconds. Since, printing to screen takes time, I have redirected output to files, in both programs.
Another point is, go.txt file is 2 bytes more in size compared to py.txt
Here's the screen shot,
The text was updated successfully, but these errors were encountered:
This is not a bug. Go's stdout is not buffered, where pythons is.
We don't the issue tracker to ask questions. Please see https://golang.org/wiki/Questions for good places to ask. Thanks.
Sorry, something went wrong.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?linux, amd64
What did you do?
A simple for loop,
What did you expect to see?
time taken to be around, 1 or 2 seconds
What did you see instead?
time taken is 6 seconds.
I have written the same in python,
time taken for python is around 2.3 seconds.
Since, printing to screen takes time, I have redirected output to files, in both programs.
Another point is, go.txt file is 2 bytes more in size compared to py.txt
Here's the screen shot,
The text was updated successfully, but these errors were encountered: