[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

performance questions

? ??

6/15/2009 5:21:00 AM

Hi, all.

I developed a testing framework based on ruby language.

and now, I want to upgrade performance of the tool.

first candidate way is using compiler.

but, I can't find out an available library for all platforms (linux,
windows, hp, aix, dec, ...)

second candidate way is code optimization.

this one is always .. always under my concerning. I mean there are no
big differences before and after.

third way is .....

could suggest some kinds of cool and nice way?

the most important thing is a multiple-platform supportable. :)


4 Answers

Mohit Sindhwani

6/15/2009 5:37:00 AM

0

Jun Young Kim wrote:
> Hi, all.
>
> I developed a testing framework based on ruby language.
>
> and now, I want to upgrade performance of the tool.
>
> first candidate way is using compiler.
>
> but, I can't find out an available library for all platforms (linux,
> windows, hp, aix, dec, ...)
>
> second candidate way is code optimization.
>
> this one is always .. always under my concerning. I mean there are no
> big differences before and after.
>
> third way is .....
>
> could suggest some kinds of cool and nice way?
>
> the most important thing is a multiple-platform supportable. :)
>
>

You will need to benchmark your system before you can know where to
optimize. What is taking time in the system? Which parts are slow?
Only then, you will have a good idea of what to optimize!

Cheers,
Mohit.
6/15/2009 | 1:36 PM.


Robert Klemme

6/15/2009 6:17:00 AM

0

On 15.06.2009 07:37, Mohit Sindhwani wrote:
> Jun Young Kim wrote:
>> I developed a testing framework based on ruby language.
>> and now, I want to upgrade performance of the tool.
>>
>> first candidate way is using compiler.

A compiler to compile what into what?

>> second candidate way is code optimization.
>>
>> this one is always .. always under my concerning. I mean there are no
>> big differences before and after.

Before and after what?

>> third way is .....
>> could suggest some kinds of cool and nice way?

I am sorry, I have no idea what you are asking here.

> You will need to benchmark your system before you can know where to
> optimize. What is taking time in the system? Which parts are slow?
> Only then, you will have a good idea of what to optimize!

I agree full heartedly.

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestprac...

Mike Stephens

6/15/2009 8:57:00 AM

0


> first candidate way is using compiler.

A general question for everyone - I would have thought it would be quite
difficult to write a complier for Ruby, in the sense that your script
gets translated to machine code. Ruby is very late-binding and weakly
typed so you can't predict what is going to be going on at run time. I
see some ostensible Ruby compilers on web searches but are they genuine?
Would they do anything for execution speed?

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

Peter Booth

6/15/2009 12:55:00 PM

0

Those of us of a certain age grew up hearing the oversimplification
"compilers are fast, interpreters are slow"
I think the lesson from Java is that the compilation step can be more
effective when it has the benefit of having execution time data about
this instance's execution path/dataset. For this reason, the default
configuration of the Sun's server JVM is to not not compile a method
until its been executed 10,000 times. This is the primary reason that,
for most benchmarks, a Java implementation will perform better than a
C/C++ implementation.

There are many post 1.8.6 Ruby runtimes that offer significant
performance gains. For me, as someone who chooses to work on
performance focused projects, I think that the JRuby is most
compelling, because of the amazing toolset it implicitly brings with
it. Profilers like YourKit, Jxinsight and Wily are light-years ahead
of anything available to us on native Ruby 1.8.6 or any other
commercial software platform.

Peter


On Jun 15, 2009, at 4:56 AM, Mike Stephens wrote:

>
>> first candidate way is using compiler.
>
> A general question for everyone - I would have thought it would be
> quite
> difficult to write a complier for Ruby, in the sense that your script
> gets translated to machine code. Ruby is very late-binding and weakly
> typed so you can't predict what is going to be going on at run time. I
> see some ostensible Ruby compilers on web searches but are they
> genuine?
> Would they do anything for execution speed?
>
> --
> Posted via http://www.ruby-....
>