performance questions

View: New views
12 Messages — Rating Filter:   Alert me  

performance questions

by Jun Young Kim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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. :)
 


Re: performance questions

by Mohit Sindhwani-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.



Re: performance questions

by Robert Klemme-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.rubybestpractices.com/


Re: performance questions

by Mike Stephens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> 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-forum.com/.


Re: performance questions

by Peter Booth-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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-forum.com/.
>



Re: performance questions

by rogerdpack :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> second candidate way is code optimization.

I'd suggest this way--very cross platform.  Use ruby-prof to profile,
then cut down on hot spots one way or another.
-=r
--
Posted via http://www.ruby-forum.com/.


Re: performance questions

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jun 15, 2009 at 7:54 AM, Peter Booth<pbooth@...> wrote:
> 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.

The toolset is absolutely fantastic on the Java platform, if you can
stomach a lot of the Java nonsense. Over the next year, we're looking
to really "bring JRuby to the Java world" in a serious way. We want to
bring the type systems closer together, make it possible to integrate
with all frameworks on the JVM and all the usual "Java ways" of doing
things with annotations, serialization, and so on, and start solving
the problems of the Java platform in a Ruby way. You might consider it
us doing for the Java world what MacRuby is doing for ObjC/Cocoa, and
hopefully unifying the two worlds as well as Laurent has done with
MacRuby.

So if you've ever been interested in the tooling and library landscape
of the Java world but really want to use Ruby with all of it, we're
really love to get your help and/or input. There's so much out there
and such a gigantic pool of developers and development opportunities,
we could grow the Ruby community tremendously by taking the JVM world
over. :)

- Charlie


Re: performance questions

by Eleanor McHugh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3 Jul 2009, at 23:03, Charles Oliver Nutter wrote:
> So if you've ever been interested in the tooling and library landscape
> of the Java world but really want to use Ruby with all of it, we're
> really love to get your help and/or input. There's so much out there
> and such a gigantic pool of developers and development opportunities,
> we could grow the Ruby community tremendously by taking the JVM world
> over. :)

And finally the master plan is revealed ;)


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason



Re: performance questions

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 3, 2009 at 5:58 PM, Eleanor
McHugh<eleanor@...> wrote:

> On 3 Jul 2009, at 23:03, Charles Oliver Nutter wrote:
>>
>> So if you've ever been interested in the tooling and library landscape
>> of the Java world but really want to use Ruby with all of it, we're
>> really love to get your help and/or input. There's so much out there
>> and such a gigantic pool of developers and development opportunities,
>> we could grow the Ruby community tremendously by taking the JVM world
>> over. :)
>
> And finally the master plan is revealed ;)

Indeed! Join us in our plot for world domination!

- Charlie


Re: performance questions

by Eleanor McHugh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 8 Jul 2009, at 04:48, Charles Oliver Nutter wrote:

> On Fri, Jul 3, 2009 at 5:58 PM, Eleanor
> McHugh<eleanor@...> wrote:
>> On 3 Jul 2009, at 23:03, Charles Oliver Nutter wrote:
>>>
>>> So if you've ever been interested in the tooling and library  
>>> landscape
>>> of the Java world but really want to use Ruby with all of it, we're
>>> really love to get your help and/or input. There's so much out there
>>> and such a gigantic pool of developers and development  
>>> opportunities,
>>> we could grow the Ruby community tremendously by taking the JVM  
>>> world
>>> over. :)
>>
>> And finally the master plan is revealed ;)
>
> Indeed! Join us in our plot for world domination!


Well if I can find time for it I hope to include some jruby-ffi unix  
abuse at LSRC, just to demonstrate how close that world domination is...


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason



Re: performance questions

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 8, 2009 at 6:23 AM, Eleanor
McHugh<eleanor@...> wrote:
> Well if I can find time for it I hope to include some jruby-ffi unix abuse
> at LSRC, just to demonstrate how close that world domination is...

Excellent! I can't wait to see how it turns out :)

- Charlie


Re: performance questions

by Eleanor McHugh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 8 Jul 2009, at 23:18, Charles Oliver Nutter wrote:
> On Wed, Jul 8, 2009 at 6:23 AM, Eleanor
> McHugh<eleanor@...> wrote:
>> Well if I can find time for it I hope to include some jruby-ffi  
>> unix abuse
>> at LSRC, just to demonstrate how close that world domination is...
>
> Excellent! I can't wait to see how it turns out :)


Me too :)


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason