Professional Web Applications Themes

Ruby speed comparison - Ruby

Hello, I want to use ruby as an embedded scripting language within a c++ server. As an alternative to ruby I also took a look on python. I noticed that it is possible to precompile scripts in python and run them later without the need to recompile the script. As I didn't find the same possibility within the ruby C-API I'm worrying about the speed penalties if I use ruby. So is it possible to precompile a ruby script (I don't want to have an .exe I want to have something like a precompiled .jar oder .class from java)? If ...

  1. #1

    Default Ruby speed comparison

    Hello,

    I want to use ruby as an embedded scripting language within a c++ server. As
    an alternative to ruby I also took a look on python. I noticed that it is
    possible to precompile scripts in python and run them later without the need
    to recompile the script. As I didn't find the same possibility within the
    ruby C-API I'm worrying about the speed penalties if I use ruby.
    So is it possible to precompile a ruby script (I don't want to have an .exe
    I want to have something like a precompiled .jar oder .class from java)?
    If this isn't possible the question is if ruby isn't too slow for my usage
    because I plan to use the scripting language very frequently within the
    program. Are there any performance benchmarks available?

    Thanks in advance,
    Markus

    Markus Hillbrand Guest

  2. #2

    Default Re: Ruby speed comparison

    il Sun, 19 Oct 2003 20:57:58 +0900, "Markus Hillbrand"
    <m_hillbrandhotmail.com> ha scritto::
    >Hello,
    >
    >I want to use ruby as an embedded scripting language within a c++ server. As
    >an alternative to ruby I also took a look on python. I noticed that it is
    >possible to precompile scripts in python and run them later without the need
    >to recompile the script. As I didn't find the same possibility within the
    >ruby C-API I'm worrying about the speed penalties if I use ruby.
    >So is it possible to precompile a ruby script (I don't want to have an .exe
    >I want to have something like a precompiled .jar oder .class from java)?
    it is not possible AFAIK, it will be with the next major release (2.0
    aka rite)

    >If this isn't possible the question is if ruby isn't too slow for my usage
    >because I plan to use the scripting language very frequently within the
    >program. Are there any performance benchmarks available?
    again, AFAIK ruby is slower than python in some benchamrks (i.e.
    google for 'great language shootout'). It may be faster in others.
    I don't think there is a *recent* and complete benchmark/comparison of
    the two.

    But, I don't think this would a problem for you. I don't think that
    you're planning to use $the_script_language so extensive that you
    could notice differences of this kind..

    I think you may even take a look at lua..
    (just my 2c)

    gabriele renzi Guest

  3. #3

    Default Re: Ruby speed comparison


    "Markus Hillbrand" <m_hillbrandhotmail.com> schrieb im Newsbeitrag
    news:BAY1-DAV32N1AWF4Jp000001d4fhotmail.com...
    > Hello,
    >
    > I want to use ruby as an embedded scripting language within a c++ server.
    As
    > an alternative to ruby I also took a look on python. I noticed that it is
    > possible to precompile scripts in python and run them later without the
    need
    > to recompile the script. As I didn't find the same possibility within the
    > ruby C-API I'm worrying about the speed penalties if I use ruby.
    Well, if you use only one instance of the interpreter, don't throw it away,
    and your script requires some code, that code will be compiled only once and
    stay in mem AFAIK. (correct me someone if I'm wrong). So the overhead
    shouldn't be too big.
    > So is it possible to precompile a ruby script (I don't want to have an
    ..exe
    > I want to have something like a precompiled .jar oder .class from java)?
    > If this isn't possible the question is if ruby isn't too slow for my usage
    > because I plan to use the scripting language very frequently within the
    > program.
    Only testing and measuring can answer this question. It depends on the
    usage of the language and the context (i.e. your server).
    > Are there any performance benchmarks available?
    I guess there are. The question is, whether general purpose benchmarks will
    help you. When it comes to performance, measurements have the final say.

    Kind regards

    robert

    Robert Klemme Guest

Similar Threads

  1. Replies: 0
    Last Post: November 1st, 05:21 PM
  2. Replies: 1
    Last Post: October 29th, 07:52 PM
  3. [ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge
    By guillaume.pierronnet@ratp.fr in forum Ruby
    Replies: 0
    Last Post: August 31st, 11:57 PM
  4. Replies: 1
    Last Post: August 15th, 11:50 AM
  5. Dual Xeon Linux vs. dual G5 : Where can I find direct speed comparison?
    By Jim Kroger in forum Mac Applications & Software
    Replies: 75
    Last Post: August 6th, 06:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139