News for hackers. Stuff that matters.
Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by davidw on Wednesday January 21, 2015 @10:44AM (#8923538)
Nice article on rewriting something: it focuses on the need for the rewrite, and on an analysis done beforehand to get an idea of what to focus on. The rewrite is driven by a successful business, in other words.

I'm a bit curious what was so slow about the Ruby code, as it sounds like it was just doing 'managing' rather than actual heavy-duty processing, which no, it is not good at.

Erlang sounds like it would have been a good fit too, although it's not quite as performant as Go.

Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by wowoc on Wednesday January 21, 2015 @10:57AM (#8923603)
Thanks!

It has been some time since we ran the profiler on the Ruby code, but AFAIR it was doing a lot of parsing; also it extensively used a logging gem that was dumping Ruby objects to strings. We could have just used another logging library and rewritten the parsing code to C, but when we checked the numbers the potential improvements didn't seem good enough.

Erlang probably would have worked too, but we already had some code in Go.

Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by debacle on Wednesday January 21, 2015 @11:04AM (#8923648)
I don't see how this is exceptionally surprising. You rewrote an application from one of the slowest scripted languages out there to a new, fast systems level programming language.

Maybe it just underscores the slowness of Ruby.

Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by wowoc on Wednesday January 21, 2015 @11:07AM (#8923669)
But it's not just about pure, CPU-wise language speed. We re-architected some of the software, and Go concurrency model was very helpful with that.
Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by debacle on Wednesday January 21, 2015 @11:19AM (#8923737)
What I think you did is great, and I love reading about these things, but if the initial implementation was in Perl or JavaScript you would have seen more like a 10-20x speedup.
Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by WaterSponge on Wednesday January 21, 2015 @11:36AM (#8923825)
Your main site is down. Giving off 502s.

https://www.pandastream.com/

Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by wowoc on Wednesday January 21, 2015 @11:43AM (#8923855)
Whoops! We're working on that, it will be back in a moment.

PS. But Panda (the service) is working, it's just the static frontpage.

Re:Rewrite from Ruby to Golang resulted in ~70x speed increase by mmwicker on Wednesday January 21, 2015 @10:51AM (#8923572)
Best in class!