3 ms·
I can't argue with that, though I'm running this on just one core (single process). If I was better with the v8 profiler I would check to see how much time it
by yesbabyyes 15y ago
I can't argue with that, though I'm running this on just one core (single process).
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.
- ariwilson 15y agoGo runs on a single core unless you start using channels and/or threading libraries. So it should be apples-to-apples.
- adgar 15y agoGo 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?
- 4ad 15y agoGOMAXPROCS it is :-). It's a quick fixup, the runtime will eventually schedule on multiple threads without needing the user to specify anything.
- kinofcain 15y agoTrue, 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 http://golang.org/pkg/http/#Server.Serve Though adgar is right, for now I believe you need to specify GOMAXPROCS to utilize multiple cores. http://golang.org/pkg/runtime/#GOMAXPROCS http://golang.org/pkg/runtime/#GOMAXPROCS
- yesbabyyes 15y agoI have added the v8 profiler output to the gist. It seems to spend most of it's time in zlib.