From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-07-02T12:10:47+09:00 Subject: Re: ruby vs. perl In article <3D20A557.8010906@path.berkeley.edu>, Joel VanderWerf wrote: >Paul Brannan wrote: >> As interesting as this is, I don't think that for real-world >> applications, any of it is relevant. Most Ruby and Perl programmers >> will rewrite a portion of code as a C extension when it is not fast >> enough. Given this approach, Ruby and Perl will probably perform >> similarly for most applications. > >Ruby's advantage here is that the C interface is very nice. From what >I've heard, it's much more seamless than Perl's C interface (which I >admit to not having used). > >I use Ruby for performance-intensive numerical simulations. Because >Ruby's so good at quick and dirty string processing (like Perl) as well >as complex data structures (unlike Perl), it's a reasonable task to >generate C code on the fly to implement user-defined simulation >specifications. I'm getting performance comparable with the C >application that was originally used to do this work, plus advantages of >being able to control, inspect, etc. the simulation from Ruby code. > Joel, This generating C on the fly concept sounds interesting, can you go into more detail? Any code you can post? Phil