SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 43 | Next

Ola Bini

"Practical JRuby on Rails Web 2.0 Projects: Bringing Ruby on Rails to Java"


CHAPTER 1 ?–  INTRODUCTION 4
Why JRuby on Rails?
Now you know why Ruby and Rails are interesting and exciting technologies. What??™s left to tell
is why JRuby on Rails is different enough to warrant a book about it. I didn??™t mention in the
introduction to Ruby that there are several problems with MRI. Many of these problems are
caused by the flexibility of the language, and the fact that Matz has always focused on the
language itself, not on its implementation.
The first problem is performance. In many cases, Ruby is fast enough and it works very
well for many of its tasks. On the other hand, Ruby routinely finishes last in all language performance
benchmarks. There??™s a common attitude that if you have performance problems in
Ruby, you can always drop down to C and implement the critical parts there. Now, I love the
Ruby language. That??™s why I want to use it. I don??™t want to drop down to C, and I especially
don??™t want to drop down to C for the critical areas of my application. In fact, it should be the
case that the critical parts are where I??™ll gain the most by using Ruby. However, that??™s not
always possible today.
JRuby aims to fix that by focusing heavily on performance. The 1.0 release didn??™t have
much performance work in it, and that shows. It??™s hard to measure general performance, but
in most cases JRuby 1.0 seems to be about 1.5 to 2 times slower than Ruby 1.8.6. The raison
d??™??tre for 1.0 was compatibility. However, while working on the interpreter and compiler, the
core team laid down the foundations to build on and improve performance.


Pages:
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55