2 ms·
Also worth nothing that what GHC does in 8 seconds, Ruby does in 48 minutes. This is why I always chuckle when people get super-excited about multi-core concur
by jrockway 17y ago
Also worth nothing that what GHC does in 8 seconds, Ruby does in 48 minutes. This is why I always chuckle when people get super-excited about multi-core concurrency in langauges like Perl, Python, and Ruby -- at best, you will make your app 4-8x faster. But by moving to a different language, you can make your app 360x faster.
Something to keep in mind.
- neilc 17y agoBut by moving to a different language, you can make your app 360x faster. If your "app" is a toy microbenchmark with an under-specified benchmarking methodology, then sure. You could also make your "app" 360x faster by switching to a userspace thread implementation.
- jrockway 17y agoLightweight threads are a much better fit for many applications. If you are writing one of those applications, this benchmark shows that you can get great performance using Haskell... with only a few lines of code. I am sure C would do better with a proper userspace thread library, but nobody has submitted such a program to the shootout yet. "If it's so easy..."
- thenduks 17y agoI see your point but unfortunately using Haskell doesn't magically also make your database (/etc other bottlenecks) 360x faster, so... Ruby it is :)
- jamesbritt 17y agoAnd you can call Haskell from Ruby http://github.com/mwotton/Hubris/tree/master http://github.com/mwotton/Hubris/tree/master
- jrockway 17y agoI have written a lot of database-driven web applications in dynamic languages, and the database has never been the bottleneck. It has always been in the application code. (Actually, not true, when I worked for $LARGE_ADVERTISING_COMPANY, we checked the state of the session in the database for every request. This put an enormous load on the database, and made every page load take at least two seconds waiting for locks. No, I did not design any part of this system, nor was I allowed to fix it; so it doesn't count :)