On Mon, Jun 21, 2004 at 09:05:33AM +0900, Florian Weber wrote:
>
> On Jun 21, 2004, at 1:58 Uhr, gabriele renzi wrote:
>
> >il Mon, 21 Jun 2004 07:55:25 +0900, Florian Weber
> ><csshsh / structbench.com> ha scritto::
> >
> >>
> >>and anyways, why does it take ruby so long to load the files and
> >>compile
> >>it when the same would only take a fragment of it with php?
> >>
> >
> >I just thought of this: does rails uses ERB or ERuby ?
> >The first one is basically a pure ruby version of the latter, maybe if
> >that is the one used you may seicth to the C one and get some better
> >performance..
>
> its not really a issue with rails..
>
> its a issue with the performance ruby reads and compiles files..
>
> see my email before about how i tested it. there i only required to
> files. no rails stuff going on..
Can you show us your PHP file which you used for measuring?
The libraries you loaded are not pure C extensions! Have a look at the
number of lines:
library | source lines
--------|-------------
yaml | 4158
logger | 728
cgi | 2909
So I guess, compiling ~5000 lines in 0.09 seconds, is not that bad at
all. This gives a rate of 50.000 lines per second.
Now try the same in PHP, and measure again.
Regards,
Michael