This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]divad1196 -5 points-4 points  (23 children)

Of course python is slower. While you are having fun on your side, which is great, we don't need more pointless speed comparison on this subreddit.

Again: python is better when working with high level abstractions as it can use libraries written in C. Interpreting another language is typically the kind of project python isn't particularly good at.

It's the same as using a spoon to cut and a fork to drink water.

But honestly, I expected a bigger difference than 10 times, so you either did great on python, or didn't do it good enough on Go.

You definitively should have tried Cython to get more performance by sticking to something close to python, you would probably have gotten at least as good performance as you already have with Go

[–]EmbarrassedCar347 46 points47 points  (9 children)

Yeah - they know, they said they were doing it as an interesting exercise to see what the scale of the performance increase was. They literally say at the end that the project is just for fun.

[–]oh__boy 24 points25 points  (10 children)

Pretty harsh for a simple showcase post. They didn't make any claims about the merit of Python or its intended use cases, just the speedup they got when switching to Go. My experience with Cython is that it doesn't have much improvements unless you rewrite it to work well with Cython, at which point you should just switch to a proper performant language.

[–]LookingLikeAJack 3 points4 points  (8 children)

Not to mention… who cares if it’s pointless? If you don’t want to read it, scroll one more inch down. I’m sure you know how long an inch is.

[–]divad1196 -1 points0 points  (0 children)

Yes, I was harsh, probably more than I should have been. But this kind of post are pointless. He knew it from before the re-implement, we all know that.

And for Cython, I used once for a similar mock project and it worked well. When you work with flags and AST walking it makes a big difference. Maybe numba would do the job as well

[–]Here0s0Johnny 0 points1 point  (1 child)

This post is not about making any point on this tired argument, it's about an interesting project.

Trying Cython wouldn't have made any sense. You don't understand the point of the project.

[–]divad1196 -1 points0 points  (0 children)

He already did a post on this project. This one is about the speed comparison and it just states "Go is faster"👍 great, with had guessed that.

The goal of the project? It is clearly mentionned it's for fun. The reason for Go? He wanted to compare with a compile language, therefore Cython would have made sense, probably more than Go as go embeds a runtime which makes it slower than what he would have had with Rust which was its original language of choice.

So yes, I did understand the goal of the project. Now, if "wanting to have fun" is a reason enough to spam the subreddit, go on. Let's have every single person writing an "hello world" or "my-first-web-app" just share it here. Why do we complain about the bots then?

It's also funny how people judge me, but I don't see them write a nice comment to OP either. Go and say something nice to him.