3 ms·
> I don't accuse them of not saving the world, but Ruby and Rails lost a great opportunity to dominate the web community. They didn't lose this opportunity bec
by laureny 13y ago
> I don't accuse them of not saving the world, but Ruby and Rails lost a great opportunity to dominate the web community.
They didn't lose this opportunity because of Twitter, they lost it because the fact that Ruby is dynamically typed puts a hard limit on how fast it can be. Twitter tried very hard to make it scale before making the decision to switch to Java, and they just couldn't do it.
The task was just impossible, switching to Java was the only reasonable decision given their constraints.
- cygwin98 13y agoJavascript is also a dynamically typed script language, which Google managed to make at least one order of magnitude faster with V8. It's likely same tricks can be applied to Ruby.
- Daishiman 13y agoGoogle has a full-time team of some of the best compiler writers in the world wholly dedicated to tuning Javascript, and they have spent literally years to get it to perform how it does today, and it's still far from competing with the JVM, and will likely never be able to do basic things such as multithreading and proper type safety. Twitter was absolutely right in doing what they did.
- anonyfox 13y agohttps://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/ https://www.paypal-engineering.com/2013/11/22/node-js-at-pay... Seems that node.js outperforms the JVM for WebDev nowadays.
- esailija 13y agoOtoh they don't use some top secret innovations but decades old techniques accessible to everyone. And language benchmarks don't tell the whole story. In Java, idiomatic and typical code will be optimized very well whereas in Javascript such code runs easily at least an order of magnitude slower than its potential. Try to run some idiomatic JS through https://github.com/petkaantonov/nodeperf/ https://github.com/petkaantonov/nodeperf/ and see it explode :) So even if Javascript can be shown in some benchmark to close on the JVM, the benchmarks are ignoring the fact that you cannot write Javascript carelessly to get anywhere near those speeds unlike with Java.
- pjmlp 13y agoThere are lots of dynamic languages with native compilers around, offering speeds that beat Ruby's canonical implementation. Are you aware that Hotspot, Sun/Oracle's JIT compiler was actually developed for a Smalltalk dialect, Self?
- justincormack 13y agoLuaJIT shows dynamically typed languages can be fast. And even plain Lua is enormously faster than Ruby. Complexity costs, not necessarily being dynamic.