Robert Klemme
10/19/2003 8:06:00 PM
"Markus Hillbrand" <m_hillbrand@hotmail.com> schrieb im Newsbeitrag
news:BAY1-DAV32N1AWF4Jp000001d4f@hotmail.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