Re: Comparisons and Benchmarking

torbenm@pc-003.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Wed, 21 Oct 2009 10:32:15 +0200

          From comp.compilers

Related articles
[2 earlier articles]
Re: Comparisons and Benchmarking SidTouati@inria.fr (Sid Touati) (2009-10-19)
Re: Comparisons and Benchmarking anton@mips.complang.tuwien.ac.at (2009-10-19)
Re: Comparisons and Benchmarking paul.biggar@gmail.com (Paul Biggar) (2009-10-20)
Re: Comparisons and Benchmarking igouy2@yahoo.com (Isaac Gouy) (2009-10-20)
Re: Comparisons and Benchmarking tc@cs.bath.ac.uk (Tom Crick) (2009-10-20)
Re: Comparisons and Benchmarking herron.philip@googlemail.com (Philip Herron) (2009-10-21)
Re: Comparisons and Benchmarking torbenm@pc-003.diku.dk (2009-10-21)
Re: Comparisons and Benchmarking gneuner2@comcast.net (George Neuner) (2009-10-21)
Re: Comparisons and Benchmarking bear@sonic.net (Ray) (2009-11-04)
Re: Comparisons and Benchmarking bartc@freeuk.com (bartc) (2009-11-05)
| List of all articles for this month |
From: torbenm@pc-003.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: Wed, 21 Oct 2009 10:32:15 +0200
Organization: Department of Computer Science, University of Copenhagen
References: 09-10-016 09-10-021 09-10-026
Keywords: benchmarks, performance, comment
Posted-Date: 22 Oct 2009 16:47:13 EDT

Tom Crick <tc@cs.bath.ac.uk> writes:


> [At the level of C and C++, if the various languages don't produce
> programs that are all O(the same) something is seriously peculiar. I
> could imagine, e.g., perl and awk might be different if you use their
> built in hhash tables and your data hashes a lot better in one than in
> the other, but if all your loops and such are explicit, how could the
> performance be different by more than a constant factor? -John]


If the programs allocate and release memory frequently, the
implementation of these operations can dominate the time. And (in spite
of many people's naive expectations), neither allocation of nor freeing
memory are necessarily constant-time operations. Different
implementations of malloc() and free() may have different tradeoffs
(without either being a "bad" implementation), so a particular program
may well have a different big-O complexity with different
implementations of malloc() and free().


You could say that this is not a question of language but of library
implementation, but the distinction between what is a language feature
and what is a library feature is strained at best if all implementations
of a language are required to implement certain standard functions.


Torben
[Good point, libraries can make a huge difference in performance. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.