Re:From zero to Go: launching on the Google homepage in 24 h...
by ariwilson on Tuesday December 13, 2011 @10:37PM
(#3350463)
Go runs on a single core unless you start using channels and/or threading libraries. So it should be apples-to-apples.
Re:From zero to Go: launching on the Google homepage in 24 h...
by kinofcain on Wednesday December 14, 2011 @12:00AM
(#3350684)
True, but the base http package handles each request on a different goroutine, so your requests could be handled concurrently:
http://golang.org/pkg/http/#Server.Serve
Though adgar is right, for now I believe you need to specify GOMAXPROCS to utilize multiple cores.
Re:From zero to Go: launching on the Google homepage in 24 h...
by adgar on Tuesday December 13, 2011 @10:46PM
(#3350482)
Go runs on a single core if you use channels anyway unless you specify an environment variable (something like GO_MAX_PROCS). Not sure about threading libraries since I haven't really considered using them in Go. I'm actually curious what people are using them for in Go - maybe games?
Re:From zero to Go: launching on the Google homepage in 24 h...
by 4ad on Wednesday December 14, 2011 @12:28PM
(#3352673)
GOMAXPROCS it is :-).
It's a quick fixup, the runtime will eventually schedule on multiple threads without needing the user to specify anything.
Re:From zero to Go: launching on the Google homepage in 24 h...
by yesbabyyes on Wednesday December 14, 2011 @03:24PM
(#3353435)
I have added the v8 profiler output to the gist. It seems to spend most of it's time in zlib.
If I was better with the v8 profiler I would check to see how much time it spends in JS land vs C, since node-canvas is all C, as well as the http parser.