[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Small Doubt in Ruby

Rock Roll

8/28/2008 12:45:00 PM

Hi. I want to know whether assembly programming is possible in Ruby like
in C or C++. Please also give some links for that if possible. Thank you
--
Posted via http://www.ruby-....

6 Answers

Lex Williams

8/28/2008 12:46:00 PM

0

Rock Roll wrote:
> Hi. I want to know whether assembly programming is possible in Ruby like
> in C or C++. Please also give some links for that if possible. Thank you

Ruby supports inline C , and I guess you could call __asm__ from C ,
right ?
--
Posted via http://www.ruby-....

Rock Roll

8/28/2008 12:49:00 PM

0

Thank you for you reply. But won't that reduce execution time of the
program?
--
Posted via http://www.ruby-....

Lex Williams

8/28/2008 12:50:00 PM

0

Rock Roll wrote:
> Thank you for you reply. But won't that reduce execution time of the
> program?

I don't think it would be noticeable . Inline C is used in ruby ( among
other things ) to boost performance .
--
Posted via http://www.ruby-....

Rock Roll

8/28/2008 12:51:00 PM

0

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

Michael Morin

8/28/2008 1:53:00 PM

0

Rock Roll wrote:
> Hi. I want to know whether assembly programming is possible in Ruby like
> in C or C++. Please also give some links for that if possible. Thank you

Assembly and Ruby are kind of an odd couple. Compared to the cost of
Ruby itself, the performance gained by any assembly routine vs. a C
routine will probably be quite small. What is it exactly you want to
do? It just seems so strange to mix Ruby and Assembly code.

--
Michael Morin
Guide to Ruby
http://ruby....
Become an About.com Guide: beaguide.about.com
About.com is part of the New York Times Company

John Carter

8/29/2008 2:09:00 AM

0

On Thu, 28 Aug 2008, Michael Morin wrote:

> Rock Roll wrote:
> Assembly and Ruby are kind of an odd couple. Compared to the cost of Ruby
> itself, the performance gained by any assembly routine vs. a C routine will
> probably be quite small. What is it exactly you want to do? It just seems
> so strange to mix Ruby and Assembly code.

Usually inline asm is about doing Rich and Strange things to hardware.

John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand