Live data from Hacker News

Why is this Go faster than the equivalent Java?

boyter.org

21–30 of 105 posts

Re: Why is this Go faster than the equivalent Java?

#22

Earlier quoted context omitted.

How is that working out for you? Isn't the pay significantly less being a sysadmin?

No, it's better. I basically got burned out writing the same code for 5 different financial companies so tried something new. Loved Linux, loved the CLI, loved the power it gave me. I've literally saved a startup when paged in a nightclub at 3am and having to type very carefully to fix their database replication. You need to pivot in work, especially as most of us will be working for 40 years+. I'm getting into the s…

I always seem to end up in sysadmin work. I guess I'm good at it. If you're smart and can use tools to your advantage you can create great value. Using ansible and judicious scripting I can do the work that used to take half a dozen sysadmins who just ploded through repetitive work over and over manually. That's a good argument to get a nice salary.

Re: Why is this Go faster than the equivalent Java?

#24

Earlier quoted context omitted.

It's illusory to think that we have a choice. It's hard to avoid becoming obsolete over a long timespan.

I am a bit confused about what you are referring to. Are you saying that we do not have many choices when it comes to work? I am about to graduate, but a lot of people seem to be saying that once you gain experience it is easy to hop to different jobs.

After a while you get pigeonholed. You can hop jobs easily but it is the same shit, different name on the building. It is often easier to pivot inside a company then jump to a new company.

Re: Why is this Go faster than the equivalent Java?

#25
post #8

I seem to be missing the point or lesson of the post? Speed comparison between two languages, botched the Java algorithm... and ...?

And the final result was that the two languages had roughly the same performance, which may surprise folks that believe Java is still a slow language.

Re: Why is this Go faster than the equivalent Java?

#26

tl;dr: The Go implementation being faster has nothing to do with Java or Go. The version implemented in Go used a slightly different algorithm, which allowed hot inner loops to terminate early, greatly improving the performance of the algorithm.

If I had a penny for every...

Re: Why is this Go faster than the equivalent Java?

#27

Earlier quoted context omitted.

How is that working out for you? Isn't the pay significantly less being a sysadmin?

It's illusory to think that we have a choice. It's hard to avoid becoming obsolete over a long timespan.

I'm going to define "long timespan" as being ~40 years (roughly how long the boomers expected to work for)

I don't think it's "hard" per se, but it does require intentional effort. I can also see how, with a difficult work schedule, or family commitments, it may become hard or even impossible to carve out the time.

I'm about 23 years into this journey, and although I still remember plenty of esoteric trivia that was useful programming in the 90's, and is useless now, there still appears to be room to learn new things every day

Re: Why is this Go faster than the equivalent Java?

#28

tl;dr: The Go implementation being faster has nothing to do with Java or Go. The version implemented in Go used a slightly different algorithm, which allowed hot inner loops to terminate early, greatly improving the performance of the algorithm.

I like Go, but it's not dramatically faster than Java. Any contest between the two of them will probably just be a back and forth of optimizations. They share pretty much the same upper bound.

Re: Why is this Go faster than the equivalent Java?

#29
post #25
post #8

I seem to be missing the point or lesson of the post? Speed comparison between two languages, botched the Java algorithm... and ...?

And the final result was that the two languages had roughly the same performance, which may surprise folks that believe Java is still a slow language.

It hasn't been slow since basically 1.3 when HotSpot became default.

Re: Why is this Go faster than the equivalent Java?

#30

Earlier quoted context omitted.

How is that working out for you? Isn't the pay significantly less being a sysadmin?

No, it's better. I basically got burned out writing the same code for 5 different financial companies so tried something new. Loved Linux, loved the CLI, loved the power it gave me. I've literally saved a startup when paged in a nightclub at 3am and having to type very carefully to fix their database replication. You need to pivot in work, especially as most of us will be working for 40 years+. I'm getting into the s…

Hmm... I was asking because I am about to graduate in CS. But I think I like Sysadmin stuff more.
Post reply on HN