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

After Rust - Now Python 3.5 beats golang #21354

Closed
rebootcode opened this issue Aug 8, 2017 · 5 comments
Closed

After Rust - Now Python 3.5 beats golang #21354

rebootcode opened this issue Aug 8, 2017 · 5 comments

Comments

@rebootcode
Copy link

Japronto - https://github.com/squeaky-pl/japronto which is built over python 3.5 now claims to beat golang by twice the speed and performance.

My Question is - Can python beat this ?

What version of Go are you using (go version)?

1.8.3

What operating system and processor architecture are you using (go env)?

Ubuntu 16.04

What did you do?

Benchmark

@dlsniper
Copy link
Contributor

dlsniper commented Aug 8, 2017

it's nice of Japronto that they are doing 1.2 million requests a second. But if you need any meaningful help, I suggest you have a look at these places to get help https://golang.org/help/#help on how to optimize your code to make sure it makes the best out of Go. This is not a real Go issue as far as I can tell and should be closed.

@bradfitz bradfitz closed this as completed Aug 8, 2017
@dlsniper
Copy link
Contributor

dlsniper commented Aug 8, 2017

Oh, and so that you don't leave confused from this interaction:

https://github.com/squeaky-pl/japronto/tree/master/benchmarks/golang -> looking at the code there's an extra condition in there executed for Go and not for the Python thingy. squeaky-pl/japronto#29 -> PR opened since Feb 3rd reflects that.

But, worse, GOMAXPROCS is set to 1 on a m4.2xl instance which has 8 vCPUs, which means Go will run on a single core instead of 8.

You can do your own benchmarks after receiving this information and see what happens :)

Hope it helps.

@rebootcode
Copy link
Author

To be fair all the contestants (including Go) were running single worker process. Servers were load tested using wrk with 1 thread, 100 connections and 24 simultaneous (pipelined) requests per connection (cumulative parallelism of 2400 requests).

@faiface
Copy link

faiface commented Aug 16, 2017

The server is written in hand tweaked C trying to take advantage of modern CPUs.

Pure Python would be way slower.

@davecheney
Copy link
Contributor

The discussion on this issue has ended. I am closing comments on this issue.

You may continue to debate it on other forums if you wish. Please see https://golang.org/wiki/Questions for good places to ask. Thanks.

@golang golang locked and limited conversation to collaborators Aug 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants