Greetings Fellow Monks
I was reading an article, which was linked from Slashdot. It is about the oft repeated myth of the slowness of memory allocation and deallocation in the JVM.
What really caught my eye was this statement by the author of the article:
"And allocation performance is not a trivial component of overall performance -- benchmarks show that many real-world C and C++ programs, such as Perl and Ghostscript, spend 20 to 30 percent of their total execution time in malloc and free -- far more than the allocation and garbage collection overhead of a healthy Java application"
Now the author links to a research article on the subject here (warning: it is a PDF file). A quick browse through the article shows that it was done using Perl 4.10: "Perl C Perl 4.10, is a publicly available report extraction and printing language
commonly used on UNIX systems. The input script formatted the words in a
dictionary into filled paragraphs."
Now, as far as I understand the situation, Java and Perl share the same idea of VM and Garbage Collection. So, I guess my question is: is this still true using the newest versions of Perl and if it is, what differences in the implementation of Perl make it so much slower than Java at allocating memory (the author claims 10 machine instructions while malloc is 60-100)?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||