Our experience using Clojure to speed up Beanstalk
blog.beanstalkapp.com
Our experience using Clojure to speed up Beanstalk
1–10 of 75 posts
Re: Our experience using Clojure to speed up Beanstalk
#2Re: Our experience using Clojure to speed up Beanstalk
#3I wonder how much of the speed change came from the difference in languages versus the difference in experience when writing both. The ruby version was written prior to the clojure one and so anything that was learned about git/programming during the ruby writing would haven be available during the clojure writing. I can believe that clojure would be faster; using concurrency well guarantees this somewhat. I still wo…
Basically same loop to go through all revisions in a repo was 15-20x times faster in Clojure than in Ruby. Very similar calls, pretty much same algorithm. But something that Ruby does inside the bindings was not very efficient.
For Git the problem was a bit different. Internally Grit (the Git API library for Ruby) tries to read huge pack files (potentially hundreds of MBs) in pure Ruby. This just can't be fast.
There's also additional overhead of not using any ORM for operating with our caches in Clojure version. That probably contributed to overall performance improvement, but 20x for svn / 40x for git measurement was taken even before we got to saving the results into DB and it stayed that way later on.
Re: Our experience using Clojure to speed up Beanstalk
#4Re: Our experience using Clojure to speed up Beanstalk
#5There seems to be a race towards the most exotic or revivalist programming languages. As if programming languages were magic bullets of some sort.
Re: Our experience using Clojure to speed up Beanstalk
#6I wonder how much of the speed change came from the difference in languages versus the difference in experience when writing both. The ruby version was written prior to the clojure one and so anything that was learned about git/programming during the ruby writing would haven be available during the clojure writing. I can believe that clojure would be faster; using concurrency well guarantees this somewhat. I still wo…
In summary: benchmark, profile, find hotspots, optimize. Works in every language. >:3
Re: Our experience using Clojure to speed up Beanstalk
#7Re: Our experience using Clojure to speed up Beanstalk
#8An interesting comparison might have been Clojure vs their previous code on JRuby.
Re: Our experience using Clojure to speed up Beanstalk
#9I've been playing with 4clojure[1] in my off time for weeks, and it's been a great introduction to the language, although it obviously doesn't help with learning how to package and deploy an application or service. How did you make the first steps from playing around in the REPL to writing production code? [1] http://www.4clojure.com/
Also if you're into Web development, I can recommend playing with Noir[2] framework and Korma[3] for SQL abstraction. Heroku also support deploying Clojure apps out of the box, so you can easily use a free tier to get something out there.
Re: Our experience using Clojure to speed up Beanstalk
#10Median speedup for the same problem in Clojure was 12x over Ruby. and 14x for Haskell; ... and 25x in Java .. and 35x in C++...