mreschke / node-vs-php-vs-go

Node.js Vs. PHP7 Vs. Go HTTP+Redis Performance Test
54 stars 5 forks source link

Go and NodeJS doesn't utilize all the cores on your machine #5

Closed ErhanAbi closed 7 years ago

ErhanAbi commented 8 years ago

Your tests are unfair because both NodeJS and Golang doesn't leverage all the cores on your machine.

For node you can at least use the cluster module.

And for go you can simply use this in your main function.

import "runtime"

func main() {
    runtime.GOMAXPROCS(runtime.NumCPU())
    // rest of the code goes here
}

But I'm surprized by the php7 perf though. 👍 Good Job :)

borislemke commented 8 years ago

@pfzero Check this out. I made my own test on my development MacBook. Node.js is waaaay faster than PHP https://github.com/borislemke/nodejs_vs_php

mreschke commented 8 years ago

Yes thats why I put the note NOTICE: These results are not accurate while using multi-core at the moment. I will be re-working the benchmark with this and more in mind soon. Thanks.