Zed and Luis drop the bomb on Ruby's poor performance

On 03/06/06, Phil J. [email protected] wrote:

On Fri, Jun 02, 2006 at 07:56:10 +0900, Dave H. wrote:

    union {
        long capa;
        VALUE shared;
    } aux;
};

What this boils down to is that a Ruby String is a C string with fancy
clothes on.

That’s the implementation. By that argument a Java XXX is just a C
struct,
because the JVM is written in C (actually C++, I think).

Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

On 6/2/06, Dave H. [email protected] wrote:

I find that assertion to be quite ludicrous. A C string is a
at all, in the sense that any/all other languages I’ve met use the
term. It’s an Object, and that makes it act in ways fundamentally
different than the strings I’ve met in SQL, AppleScript, Modula-2,
Pascal, or Basic (various dialects, all with line numbers), to name a
few.

They’re written in C. Or, rather, in the standard implementation of
Ruby, they’re written in C. The statement makes perfect sense. Whether
a String is represented as an Object or a primitive or a green baboon
is irrelevant.

Ruby and C are old friends. If you really want to know Ruby, you need
to know at least some amount of C.

You’re going to have to provide some rather compelling evidence before
I give that opinion much credence. Ruby and Perl are “old friends,”
too. Nevertheless, if there are aspects of Ruby that came from these
languages, and I cannot learn them directly and exclusively via Ruby,
that just says to me that the Ruby documentation still needs work.

You don’t need to know C to know Ruby. But to know how the standard C
implementation, the one you can download from ruby-lang.org, works,
then you’re gonna have to know some C.

Ruby is a computer language. In theory, it is indenpendent from the
implementation, and that’s an important distinction. There’s JRuby,
for example. Bt realistically, most people use the C Ruby
implementation, and you can’t ignore that.

On Mon, Jun 23, 2008 at 7:09 AM, Roger P. [email protected]
wrote:

-R

Posted via http://www.ruby-forum.com/.

Agreed, but hasn’t this dead horse been beaten enough?

Roger P. wrote:

competitive with the fastest Java implementations.
coding of some poorly performing, elegantly written web pages.
-R

Well, Zed’s rant was published some time ago – before the 1.9.0
release, I think. I know very little has changed in the MRI performance
arena, but “Rite” and “YARV” are the same thing as far as I know and
are/is indeed faster at the core than MRI.

As far as Rails is concerned, though, quite a bit of work is available
on the web on hacks for tuning it, things to avoid in your Ruby code,
etc. I suspect there is more that isn’t publicly available on tuning
Rails.

The way I interpret open source licenses, if you take an open source
toolset, squeeze all the major bottlenecks out of it and put it into
production in a server, there’s no requirement for you to release the
source of your hacks as long as you don’t attempt to distribute the
resulting binaries. :slight_smile:

I’ve speculated a bit on what I think might happen in my blog.

http://ruby-perspectives.blogspot.com/2008/06/ruby-rails-and-life-on-edge-of-chaos.html

YARV and Ruby’s poor computational performance. Zed said, and I quote:

I?ll be honest right away though and say that Ruby is slow. The
Ruby community has been ignoring the huge ?performance? elephant
standing in the room and they need to start talking about it so it
goes away. Elephants hate being talked about. There are a few
efforts to make Ruby faster, but I see a lot less action than is
needed to solve the problem. One solution in the works is a real
virtual machine called Rite (or YARV depending on who you talk to)
which is showing some real promise and seems to be speed
competitive with the fastest Java implementations.

Yeah I have come to the sad conclusion that, at least with the 1.8.x
world, if speedy execution is your goal you should probably choose
another scripting language [python+psycho comes to mind]. Especially
when considered in conjunction with rails. There I have mentioned the
elephant :slight_smile:
That being said, thankfully 95% of web pages and scripts don’t really
care about getting hammered, since they never will be. But the other 5%
will suffer until this gets figured out. And I’m not volunteering.
Hopefully this will improve in the near future. Until then back to my
coding of some poorly performing, elegantly written web pages.
-R

On Jun 23, 2008, at 8:24 AM, M. Edward (Ed) Borasky wrote:

The way I interpret open source licenses, if you take an open source
toolset, squeeze all the major bottlenecks out of it and put it into
production in a server, there’s no requirement for you to release
the source of your hacks as long as you don’t attempt to distribute
the resulting binaries. :slight_smile:

though clearly you would accumulate some mighty bad karma if you’d
done so :wink:

a @ http://codeforpeople.com/

put it into production in a server […]
as long as you don’t attempt to distribute the
resulting binaries. :slight_smile:

Your server or the server of a client?

ThoML wrote:

put it into production in a server […]
as long as you don’t attempt to distribute the
resulting binaries. :slight_smile:

Your server or the server of a client?

Good question. :slight_smile: I am not an attorney. I’m guessing “your server” is
OK, “a client’s server” is not.

On Jun 23, 7:24 am, “M. Edward (Ed) Borasky” [email protected]
wrote:

which is showing some real promise and seems to be speed
Hopefully this will improve in the near future. Until then back to my
etc. I suspect there is more that isn’t publicly available on tuning
Rails.

The way I interpret open source licenses, if you take an open source
toolset, squeeze all the major bottlenecks out of it and put it into
production in a server, there’s no requirement for you to release the
source of your hacks as long as you don’t attempt to distribute the
resulting binaries. :slight_smile:

I’ve speculated a bit on what I think might happen in my blog.

I could be wrong, but I believe that only applies to the BSD license.
Not the GNU one.

Chad

On Mon, Jun 23, 2008 at 4:57 PM, M. Edward (Ed) Borasky
[email protected] wrote:

Good question. :slight_smile: I am not an attorney. I’m guessing “your server” is OK, “a
client’s server” is not.

but he explicitly said keeping the binaries, so it cannot be client’s
server, right?
Robert


Les mêmes questions qu’on se pose
On part vers où et vers qui
Et comme indice pas grand-chose
Des roses et des orties.

Francis Cabrel

On Jun 23, 2008, at 9:42 AM, Robert D. wrote:

but he explicitly said keeping the binaries, so it cannot be client’s
server, right?

it depends. you can easily server the binary such as allowing a
client to run and applet from a webserver. things would get muddy
then. it all depends on the exact licenses involved i think. that
and religion.

a @ http://codeforpeople.com/

On Jun 23, 2008, at 12:44 PM, Lloyd L. wrote:

Wasn’t there a comment on how great French was for cursing in a sequel
to “The Matrix”?

afaik they have more ‘four letter’ words than any language in the
world - there is a great french dictionary dedicated to that which
googling might turn up…

a @ http://codeforpeople.com/

James B. wrote:

[email protected] wrote:

On Tue, 23 May 2006, Bob H. wrote:

Ruby’s focus is on something other than performance.

exactly. write poetry in french - scream insults at hockey games in
english.

Unless they’re French-Canadian.

Wasn’t there a comment on how great French was for cursing in a sequel
to “The Matrix”?

On Mon, Jun 23, 2008 at 8:51 PM, ara.t.howard [email protected]
wrote:

On Jun 23, 2008, at 12:44 PM, Lloyd L. wrote:

Wasn’t there a comment on how great French was for cursing in a sequel
to “The Matrix”?

afaik they have more ‘four letter’ words than any language in the world -
there is a great french dictionary dedicated to that which googling might
turn up…
you mean more than in Italian, ridicolous, believe me I lived in both
countries ;). But I have heared, honestly, that Hungarian beats all
records.
I could not withstand the French quote for its beauty(1) I will very
soon switch back to English quotes as for respect for the community.

(1) Which lies in the ears of the beholder, but so far I have not yet
found a beholder who disliked it :slight_smile:
R.

grocery_stocker:

On Jun 23, 7:24Â am, “M. Edward (Ed)
Borasky” [email protected] wrote:

The way I interpret open source licenses, if you take an open source
toolset, squeeze all the major bottlenecks out of it and put it into
production in a server, there’s no requirement for you to release the
source of your hacks as long as you don’t attempt to distribute the
resulting binaries. :slight_smile:

I could be wrong, but I believe that only
applies to the BSD license. Not the GNU one.

It applies both to BSD and GPL, but not to AGPL – which is basically GPL
plus the clause that the requirement of sharing the code also applies
when the code is distributed over a network, not just as a ‘binary’.

Or, to say it differently: in general, releasing a webapp under the
GPL is a bit pointless, and either BSD or AGPL should be used instead.
(The only case I can think of is the situation when you want a BSD-like
licence, but you incorporate some third-party code that’s GPL-licenced,
so you can’t BSD-licence it.)

– Shot

On Mon, Jun 23, 2008 at 10:58 PM, grocery_stocker [email protected]
wrote:

I could be wrong, but I believe that only applies to the BSD license.
Not the GNU one.

And yes, you’re wrong there. It’s about not (Shot’s made the point about
the
AGPL, but I havent taken a look at that) punishing others with your code
;).
If you decide to punish others with the results of your code (binaries),
you
have to distribute (or make available some means of getting the code)
your
code to them.

http://www.gnu.org/philosophy/free-sw.html: freedom 3 - “The freedom to
improve the program, and release your improvements to the public, so
that
the whole community benefits (freedom 3). Access to the source code is a
precondition for this.” Notice how it says “freedom”? Not “requirement”

-jf


In the meantime, here is your PSA:
“It’s so hard to write a graphics driver that open-sourcing it would not
help.”
– Andrew Fear, Software Product Manager, NVIDIA Corporation

Kyle S. wrote:

On Mon, Jun 23, 2008 at 7:09 AM, Roger P. [email protected]
wrote:

-R

Posted via http://www.ruby-forum.com/.

Agreed, but hasn’t this dead horse been beaten enough?

I would call them a sadistic necro-equine but that IS beating a dead
horse.