[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ossig] Zope faster than Apache?
I agree. Enjoy your cake :)
Regardless of the language or the specifics, you could
always argue that because of the locality of reference
principle ('90:10 rule') :
ANY program written in 90% language A, 10% language B,
where
A is not a language known for performance
B is a language heavily optimized for performance
will tend towards the performance of B, provided that the
parts A and B are carefully chosen (by profiling, etc, as
you suggest).
E.g. the Linux kernel only has a few small modules written
in assembler, but they are for the inner loops of the most
commonly called routines, etc.
You could even argue (with less backup from theory) that
using a higher level language for most of the application
enables the programmer / designer to see the bigger picture,
which may result in *more* efficient design, since they
can spend more time on design, and less time on coding.
Imran
Mukhsein Johari wrote:
Are programs written totally in C necessarily faster than programs written in Python plus a few C modules? This is something I've been thinking about and here is some anecdotal evidence that it's not always so. Of course, it's possible this is an Apache config related issue that Bruce forgot but it's also possible that it's not.
------------------
http://www.artima.com/intv/prodperf.html
Excerpt from Bruce interview:
Take Zope, for example. Zope is the enterprise application server I use for my website. Zope is virtually all Python, but includes some C code, because they profiled and optimized Zope so it would run faster. When Zope was put on my machine, I discovered it was noticeably faster than Apache had been. That seemed surprising to me, but my server guy said Apache was designed for correctness and not for speed, so it wasn't that surprising to him. Because Apache was written in C, I figured it ought to be faster. But it turned out Zope was faster.
------------------
A number of the standard modules are in fact written in C for speed of execution. A number of scientific python modules (NumArray/numpy/scipy related stuff) are also written in C. Python allows you to select which modules to optimize in C and which to leave as python using profilers. What this effectively means is that you can develop faster with python _and_ have a faster executing program (once C-optimized, if needed) for delivery. I can have my cake and eat it too. I rather like that...
Regards,
Mukhsein Johari
--
Imran William Smith
Project Manager, Open Source Development,
MIMOS Berhad, Malaysia
Asian Open Source Centre : http://www.asiaosc.org
MIMOS Open Source : http://opensource.mimos.my
------------------------------------------------------------
To unsubscribe: send mail to ossig-request@mncc.com.my
with "unsubscribe ossig" in the body of the message