Live data from Hacker News

Google Go: The Good, the Bad, and the Meh

blog.carlsensei.com

101–110 of 126 posts

Re: Google Go: The Good, the Bad, and the Meh

#101
post #90

Earlier quoted context omitted.

That would be unusual, but 80% of a program's performance is generally tied up in 20% of its code. If you can replace the 20% with a couple widely-used C libraries, then you get vastly improved performance without actually having to write much C. In most cases in Python, the part that one would consider the application proper is entirely written in Python, which use Python libraries that wrap around C libraries to do…

>80% of a program's performance is generally tied up in 20% of its code I've never seen any evidence to support this truthy sounding statement. In fact, my experience has been that it only holds true occasionally, and only for the very first initial profiling, seeing that some huge performance no-no was made. Once that is fixed, you have a pretty flat profile, with "the language is just slow" as your explanation, and…

It was a non sequitur, and a straw man - you said that python was 5 times slower than C at best and 30-50 times slower than C at worst on some benchmarks.

dnu pointed out that the benchmarks did not represent real-world Python code, since real-world code uses C libraries for performance-intensive stuff.

You responded by saying that programs that are 90% C and 10% Python are unrealistic.

Nobody ever suggested using programs that were 90% C and 10% Python, or said that that kind of usage was common. That didn't follow what dnu said at all. You weren't "reiterating" anything - you never said anything about "your uses", coldtea did, much farther up the thread. (If you're coldtea, then I understand your point, but if that's the case, you should have made that clear, as it vastly changes the context of what you were saying). You just brought up some benchmarks, which are not representative of how Python is used in the real world.

I see how you could have intended to imply that this was "your uses" by saying that coldtea must have unusual uses if he got go/2 performance out of Python, but this was hardly clear, if it is the case. Regardless, you totally misrepresented dnu's point.

As for your arguments against my points, the 80/20 rule, while obviously impossible to definitively prove, has far more authoritative supporters than it does detractors. If you haven't experienced that being the case, then that's good and well for you, but the experience of many others suggests that it usually is (in fact, it's usually stated as being closer to 90/10 than 80/20).

Your Django argument falls flat if you look at it more closely. Sure, Django might introduce some slowness, but the vast majority of web performance is in the networking and database layers, not the application layer. Your choice of language has little to no bearing on the networking aspect of things, but what do you think the database drivers are written in? C, or an equivalent. 10% of the code that has 90% of the performance impact - sound familiar? And you interact with database drivers most of the time exactly how I said - by using a Python library that wraps around a C library to run the database.

>>Quit with the straw man arguments - they add nothing to the discussion. >Neither do unwarranted accusations of straw man arguments.

I apologize if I come across as insulting - it is not my intention. My phrasing in the grandparent comment was overly antagonistic, and I'm about to edit it to fix that. But my accusations of straw man arguments were correct.

Re: Google Go: The Good, the Bad, and the Meh

#102
post #90

Earlier quoted context omitted.

That would be unusual, but 80% of a program's performance is generally tied up in 20% of its code. If you can replace the 20% with a couple widely-used C libraries, then you get vastly improved performance without actually having to write much C. In most cases in Python, the part that one would consider the application proper is entirely written in Python, which use Python libraries that wrap around C libraries to do…

>80% of a program's performance is generally tied up in 20% of its code I've never seen any evidence to support this truthy sounding statement. In fact, my experience has been that it only holds true occasionally, and only for the very first initial profiling, seeing that some huge performance no-no was made. Once that is fixed, you have a pretty flat profile, with "the language is just slow" as your explanation, and…

[deleted]

Re: Google Go: The Good, the Bad, and the Meh

#103

Earlier quoted context omitted.

>80% of a program's performance is generally tied up in 20% of its code I've never seen any evidence to support this truthy sounding statement. In fact, my experience has been that it only holds true occasionally, and only for the very first initial profiling, seeing that some huge performance no-no was made. Once that is fixed, you have a pretty flat profile, with "the language is just slow" as your explanation, and…

It was a non sequitur, and a straw man - you said that python was 5 times slower than C at best and 30-50 times slower than C at worst on some benchmarks. dnu pointed out that the benchmarks did not represent real-world Python code, since real-world code uses C libraries for performance-intensive stuff. You responded by saying that programs that are 90% C and 10% Python are unrealistic. Nobody ever suggested using pr…

>It was a non sequitur, and a straw man

It was neither, and repetition is not an argument. Let me paraphrase the conversation in the desperate hope you will at least read this since you refuse to read the thread you are discussing:

Me: if you are seeing 2x slower, then that seems like unusual uses of python. Him: I think some real world uses of python are 90% C libraries and 10% python Me: I feel the cases you are referring to are the unusual ones I spoke of.

>You weren't "reiterating" anything - you never said anything about "your uses"

Yes, I did: http://news.ycombinator.com/item?id=5202119

>You must have some very unusual uses for that to be true

Wow, its like I am really saying exactly what I told you I was saying!

>Your Django argument falls flat if you look at it more closely. Sure, Django might introduce some slowness, but the vast majority of web performance is in the networking and database layers, not the application layer

That is completely, and entirely false. Scripting language web frameworks like django, rails, zend, etc are dozens to hundreds of times slower than similar frameworks in compiled languages.

>But my accusations of straw man arguments were correct.

No, they were not. And your continued insistence that your arrogant and pointless accusation was correct is absurd. If you don't wish to read something, don't reply to it.

Re: Google Go: The Good, the Bad, and the Meh

#104
post #91

The initial quote is a good summary about the thing I find must annoying about Go. They constantly imply that programming research is useless in the real world or at least impractical, and use that to ignore the last several decades of progress. Then they try to turn ignoring research into a virtue! It essentially presents a false dichotomy between programming research and programming practice. This is particularly u…

I'm not sure who "they" are, but certainly not the core development team, and Samuel Tesla does not represent them. See for example Rob Pike saying how mind blowing and inspiring Tony Hoare's CSP paper is, how everyone should read it and how it inspired Go[1]. Another example is how Go's regexp implementation has a solid mathematical foundation[2]. Now, those are two examples of quite old programming research being used to good effect in Go, so there is an opening for criticism there. But in general I'm pretty sure the core go devs don't have have anything against programming research nor try to create this false dichotomy.

[1] http://www.youtube.com/watch?v=3DtUzH3zoFo [2] http://swtch.com/~rsc/regexp/regexp1.html

Re: Google Go: The Good, the Bad, and the Meh

#105

Earlier quoted context omitted.

It was a non sequitur, and a straw man - you said that python was 5 times slower than C at best and 30-50 times slower than C at worst on some benchmarks. dnu pointed out that the benchmarks did not represent real-world Python code, since real-world code uses C libraries for performance-intensive stuff. You responded by saying that programs that are 90% C and 10% Python are unrealistic. Nobody ever suggested using pr…

>It was a non sequitur, and a straw man It was neither, and repetition is not an argument. Let me paraphrase the conversation in the desperate hope you will at least read this since you refuse to read the thread you are discussing: Me: if you are seeing 2x slower, then that seems like unusual uses of python. Him: I think some real world uses of python are 90% C libraries and 10% python Me: I feel the cases you are re…

> Let me paraphrase the conversation in the desperate hope you will at least read this since you refuse to read the thread you are discussing

> ... your continued insistence that your arrogant and pointless accusation was correct is absurd. If you don't wish to read something, don't reply to it.

I'm attempting to keep the conversation civil (I have even gone back and changed some of my more inflammatory phrasings), and I hope you can do the same, without resorting to ad hominems such as these. I have read the entire thread several times over, and have quoted from it at length in my responses.

Prelude aside, my response.

---

> It was neither, and repetition is not an argument.

That's why I followed that statement with an entire page of argument. I didn't expect to convince you with the first sentence, only to state the subject of the argument that followed.

---

> Me: if you are seeing 2x slower, then that seems like unusual uses of python. Him: I think some real world uses of python are 90% C libraries and 10% python Me: I feel the cases you are referring to are the unusual ones I spoke of.

>> You weren't "reiterating" anything - you never said anything about "your uses"

> Yes, I did: http://news.ycombinator.com/item?id=5202119

>> You must have some very unusual uses for that to be true

> Wow, its like I am really saying exactly what I told you I was saying!

I actually mentioned what you said here in my previous argument:

> I see how you could have intended to imply that this was "your uses" by saying that coldtea must have unusual uses if he got go/2 performance out of Python, but this was hardly clear, if it is the case.

Your latest response makes it clear that this is, indeed, what you meant, but that wasn't clear from the initial conversation, even after reading it several times over.

---

> Me: if you are seeing 2x slower, then that seems like unusual uses of python. Him: I think some real world uses of python are 90% C libraries and 10% python Me: I feel the cases you are referring to are the unusual ones I spoke of.

Except dnu never said that "some" real world uses of Python are "90%" C libraries. He said, and I quote:

> for real projects, a Python programmer might use several libraries which are written in C.

That is, most real world uses of Python use some C libraries. He never suggested a ridiculous number like 90%. Your comment came across as a mockery of his argument, saying that Python could never achieve reasonable speed unless it was 90% C anyway. If this isn't what you intended, I apologize for insinuating that it was.

It came across that way because almost no real-world Python application uses 90% C, unless you want to count the entire kernel and OS it runs on.

---

>> Your Django argument falls flat if you look at it more closely. Sure, Django might introduce some slowness, but the vast majority of web performance is in the networking and database layers, not the application layer

> That is completely, and entirely false. Scripting language web frameworks like django, rails, zend, etc are dozens to hundreds of times slower than similar frameworks in compiled languages.

I think you misunderstand me. My point was that the parts of a web application that have the biggest impact on performance are the networking and database layers, not the application layer, and that language choice only affects the database and application layers. I was not arguing that Django, Rails, Zend, or other dynamic language based frameworks are as fast as compiled language based frameworks.

It may not seem like the database is that influential to performance at first - but imagine a database driver written in Python. It would be by far the slowest performing part of the application, because the database requires such enormous amounts of computation and is used so much. Thus, database drivers are written in C, so they perform quickly. But that 20% or less of the code, written in C for performance reasons, cuts down an 80% or greater slowdown which would occur if the database drivers were written in Python.

Also, as an aside, Django is hardly representative of Python as a whole. I haven't used it - I've done all my Python web development in Flask, so far, so my opinions on it aren't authoritative, and aren't intended to be so, but it seems to be an overly bloated framework whose performance is much slower than Python in general.

---

Again, I don't intend to be insulting and demeaning, and it is clear that the disagreement is due at least in part to some misunderstandings earlier in the conversation. I am happy to engage in technical discussion, even if it becomes somewhat heated, but I don't want to degrade the forum or make enemies by engaging in personal diatribe. I hope you share my desires on this subject.

Re: Google Go: The Good, the Bad, and the Meh

#106

Earlier quoted context omitted.

Most programming languages use these conventions informally. For example: Javascript - always capitalize classes Python - underscore before private properties C# - underscore in front of class level private properties Python upgraded the whitespace convention to meaningful whitespace, why shouldn't Go upgrade the naming convention?

Python - everything is public, so a convention is required to make developers distinguish between public and intended-private-but-still-public (e.g. do not touch). C# - I don't really know what's common practice in C#, but without a really good reason placing underscore in front of private properties would be really, really stupid. On Python again - I used Python everyday for the last 3 years and I hate the whitespac…

If I'm not mistaken Guido has been thinking about anonymous code blocks as a possible purpose of the with statement but he was persuaded not to do such a thing as it won't fit into python's core concept TOOWTDI (there is only one way to do it). Significant whitespace by no means implies lack of anonymous blocks, they will just look a bit differently. Look at CoffeeScript if you want to see an example.

Re: Google Go: The Good, the Bad, and the Meh

#107
A nice article. And written in a thought-provoking manner. As I read it, I think, "Do I agree that this is good/bad?"

A peeve: Just below the Accumulator Generator Challenge code, we find:

> The static typing adds a little noise, but it makes sense if you read it out loud: ....

It's not the static typing that is noisy, but the explicit typing. Haskell, for example has static typing, but it can avoid this kind of "noise".

Re: Google Go: The Good, the Bad, and the Meh

#108

I must be one of the idiot complainers he talks about, because his first "good thing" annoys me right off the bat. If you want to change a private method to public, you have to go through all your code and capitalize every use of it? Yeah, I guess it could be handled with a refactoring IDE... if Go has one. This feels like a throwback to hungarian notation. Names should just be names, quit trying to cram code syntax…

Yeah, I guess it could be handled with a refactoring IDE... if Go has one.

It does: http://golang.org/cmd/gofmt/

This feels like a throwback to hungarian notation. Names should just be names, quit trying to cram code syntax into it.

Well, speaking of Hungarian notation:

http://www.joelonsoftware.com/articles/Wrong.html

Following that logic you are right, but it's a throwback to the good kind of Hungarian notation.

Re: Google Go: The Good, the Bad, and the Meh

#109
post #92
post #8

Plus side: I had no idea about "go run foo.go" and it has changed my life. Downside: couldn't read past "And what’s up with all the languages that claim all you need are linked lists? I’m sorry, this is not 1958, and you are not John McCarthy". Did I miss anything amazing in the rest of the article? Thanks in advance.

Apparently "operator overloading, function/method overloading, [and] keyword arguments" are "bad for performance" so it's OK that Go doesn't have them.

For performance of compilation. Go compiles crazy fast -- think two seconds for complete compiler and runtime on a notebook. This provides for rapid hack-compile-debug iterations.

http://www.youtube.com/watch?feature=player_embedded&v=r...

Re: Google Go: The Good, the Bad, and the Meh

#110
post #69
post #62

Earlier quoted context omitted.

Two examples come to mind: [FooType] and: Slice If you think you must, apply sigils. The position of the brackets in the Go version is atypically bad for readability.

I don't understand. Where do your examples say they're pointers? How would you express this using your first syntax? *[4]*FooType

You could have something like * [* FooType#4]
Post reply on HN