"Chris Lattner" <sabre at nondot.org> wrote in message news:Pine.LNX.4.44.0410051204480.5863-100000 at nondot.org...> On Tue, 5 Oct 2004, Alex Vinokur wrote: > > > I would like to use LLVM-GCC to compare its performance with other compilers. > > Something like testsuite "Computing very large Fibonacci numbers" at > > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37. > > Out of curiousity, I ran some quick tests on a AMD Athlon(TM) MP 2100+ box > running Redhat linux 7.1.[snip]> > Note that this benchmark allocates a TON of memory,The main purpose of the "Computing very large Fibonacci numbers" algorithm was to create fast _recursive_ algorithm. The algorithm generates very large Fibonacci numbers using the primary recursive formula: F(n) = F(n-1) + F(n-2) n > 1; F(1) = 1, F(0) = 0. Latest version of the algorithm is 2.7.9 and can be seen at http://groups.google.com/groups?selm=2paj5hFim4q1U1%40uni-berlin.de> so it's not a wonderful benchmark of CPU bound tasks (also, the compiler in use will > have less impact than for a CPU bound program). In any case, I've added > this program to the LLVM testsuite as > SingleSource/Benchmarks/Misc-C++/bigfib.cpp, so we should have numbers for > it generated every night on multiple platforms. >[snip] Newsgroup http://news.gmane.org/gmane.comp.lang.c%2B%2B.perfometer contains another testsuites. For instance: 1. Simple C++ Perfometer Methods of copying files http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/47. 2. C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer/ http://alexvn.freeservers.com/s1/perfometer.html Latest version is 2.8.0-1.18. Its description can be ssen at http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/39 List of all testsuites ---------------------- - access to an element - argument passing - argument passing (built-in types) - argument passing (containers-1) - argument passing (containers-2) - argument passing (containers-3) - calling functions : templated vs. non-templated - container performance (Stepanov & Stroustrup) - copying files : input to output - dynamic_cast vs. switch - endl vs. "\n", '\n' [! stdout/stderr > tmp] - exception handling vs. if-statement - find method vs. find algorithm - for-loop vs. for_each - for_each vs. transform - iterators - multiple inheritance vs. single inheritance - primitive operators - pthreads - reading contents from file into one string - recursion vs. iteration vs. accumulate - str-functions vs. mem-functions (C) - string initialization (C vs. STL) - string length (C vs. STL) - string processing (C vs. STL) - stub tested functions - tech report : D1 - overhead of class operations - tech report : D3 - the Stepanov abstraction penalty benchmark - tech report : D4 - comparing function objects to function pointers - tech report : D5 - measuring the cost of synchronized I/O - virtual vs. ordinary methods -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn
On Wed, 6 Oct 2004, Alex Vinokur wrote:> > have less impact than for a CPU bound program). In any case, I've added > > this program to the LLVM testsuite as > > SingleSource/Benchmarks/Misc-C++/bigfib.cpp, so we should have numbers for > > it generated every night on multiple platforms. > > > [snip] > > Newsgroup http://news.gmane.org/gmane.comp.lang.c%2B%2B.perfometer contains another testsuites. > For instance:> 2. C/C++ Program Perfometer > http://sourceforge.net/projects/cpp-perfometer/ > http://alexvn.freeservers.com/s1/perfometer.html > > Latest version is 2.8.0-1.18. Its description can be ssen at > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/39I downloaded this and took a quick look at it. It looks like an interesting suite of benchmarks, similar in design to oopack. Unfortunately, it does not compile with LLVM (or GCC 3.4), as the source is not compliant with two phase name lookup. I get errors such as: $ llvmg++ -O3 -I. -DOPT_LEVEL=-1 -W -Wall -c pfmeter.cpp In file included from pfmeter2.h:50, from pfmeter.cpp:44: pfmeter.h: In destructor `ClassPerfoMeter<T1, T2, T3>::~ClassPerfoMeter()': pfmeter.h:620: error: there are no arguments to `check_state_resource_values' that depend on a template parameter, so a declaration of `check_state_resource_values' must be available pfmeter.h:620: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) pfmeter.h:621: error: there are no arguments to `check_state_clock' that depend on a template parameter, so a declaration of `check_state_clock' must be available and (with -fpermissive): pfmeter2.h: In member function `void ClassPerfoMeter<T1, T2, T3>::dtor_action() const': pfmeter2.h:832: error: `end_resource_value_' undeclared (first use this function) ... In any case, our test suite works best with individual programs that do one thing, then exit (like the fib program), so perfmeter isn't directly useful. It's a neat suite though, thanks for the pointer! -Chris -- http://llvm.org/ http://nondot.org/sabre/
"Chris Lattner" <sabre at nondot.org> wrote in message news:Pine.LNX.4.44.0410061044190.367-100000 at nondot.org...> On Wed, 6 Oct 2004, Alex Vinokur wrote: > > > have less impact than for a CPU bound program). In any case, I've added > > > this program to the LLVM testsuite as > > > SingleSource/Benchmarks/Misc-C++/bigfib.cpp, so we should have numbers for > > > it generated every night on multiple platforms. > > > > > [snip] > > > > Newsgroup http://news.gmane.org/gmane.comp.lang.c%2B%2B.perfometer contains another testsuites. > > For instance: > > > 2. C/C++ Program Perfometer > > http://sourceforge.net/projects/cpp-perfometer/ > > http://alexvn.freeservers.com/s1/perfometer.html > > > > Latest version is 2.8.0-1.18. Its description can be ssen at > > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/39 > > I downloaded this and took a quick look at it. It looks like an > interesting suite of benchmarks, similar in design to oopack. > Unfortunately, it does not compile with LLVM (or GCC 3.4), as the source > is not compliant with two phase name lookup. I get errors such as: > > $ llvmg++ -O3 -I. -DOPT_LEVEL=-1 -W -Wall -c pfmeter.cpp > In file included from pfmeter2.h:50, > from pfmeter.cpp:44: > pfmeter.h: In destructor `ClassPerfoMeter<T1, T2, > T3>::~ClassPerfoMeter()': > pfmeter.h:620: error: there are no arguments to > `check_state_resource_values' that depend on a template parameter, so a > declaration of `check_state_resource_values' must be available > pfmeter.h:620: error: (if you use `-fpermissive', G++ will accept your > code, but allowing the use of an undeclared name is deprecated) > pfmeter.h:621: error: there are no arguments to `check_state_clock' that > depend on a template parameter, so a declaration of `check_state_clock' > must be available > > and (with -fpermissive): > pfmeter2.h: In member function `void ClassPerfoMeter<T1, T2, > T3>::dtor_action() const': > pfmeter2.h:832: error: `end_resource_value_' undeclared (first use this > function) > ... > > In any case, our test suite works best with individual programs that do > one thing, then exit (like the fib program), so perfmeter isn't directly > useful. It's a neat suite though, thanks for the pointer! >[snip] Thanks. I compiled that with g++ 3.3 some time ago. I checked that again. * It is compiled fine with g++ 3.3. * It isn't compiled with g++ 3.4. I have such a problem with my other projects. I should update C/C++ Perfometer to suit it to g++ 3.4. Thanks again. -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn
"Alex Vinokur" <alexvn at go.to> wrote in message news:ck05ls$2qg$1 at sea.gmane.org... [snip]> Newsgroup http://news.gmane.org/gmane.comp.lang.c%2B%2B.perfometer contains another testsuites. > For instance: > > 1. Simple C++ Perfometer > Methods of copying files > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/47. >New version: // ======================================================// C/C++ Program Performance Measurement // ------------------------------------------------------- // Simple C/C++ Perfometer: Copying files (Version CF-3.0) // ====================================================== Tests have been performed for GNU g++/gpp compiler in * Cygwin, * Mingw32 interface, * DJGPP It might be of interest to LLVM-GCC perfofmance measurements as well. Links: ------ http://thread.gmane.org/gmane.comp.lang.c++.perfometer/89 http://permalink.gmane.org/gmane.comp.lang.c++.perfometer/93 http://permalink.gmane.org/gmane.comp.lang.c++.perfometer/89 http://groups-beta.google.com/group/perfo/browse_frm/thread/380ffe8e8143bb6c/e08f36ebdf45b4f3 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // Testsuites // ---------- // C-01 : C-Functions getc() and putc() // C-02 : C-Functions fgetc() and fputc() // C-03 : C-Functions fread() and fwrite() - with const size buffer // C-04 : C-Functions fread() and fwrite() - with max size buffer // unix_C_05 : UNIX system call mmap // For Cygwin only // CPP-01 : istream::operator>> and ostream::operator<< // CPP-02 : streambuf::sbumpc() and streambuf::sputc() // CPP-03 : streambuf::sbumpc() and ostream::operator<< // CPP-04 : ifstream::rdbuf(), ofstream::rdbuf() and ostream::operator<< // CPP-05 : istream::read() and ostream::write() - with const size buffer // CPP-06 : istream::read() and ostream::write(), std::ostringstream, ostream::operator<< - with const buffer // CPP-07 : istream::readsome() and ostream::write() - with const size buffer // CPP-08 : istream::read() and ostream::write() - with max size buffer // CPP-09 : std::getline, std::ostringstream, ostream::operator<< // CPP-10 : istream::getline, std::ostringstream, ostream::operator<< // CPP-11 : istream::get(char) and ostream::put // CPP-12 : istream::get(char*, streamsize) , ostream::operator<< - with const size buffer // CPP-13 : istream::get(streambuf&) and std::streambuf, ostream::operator<< // CPP-14 : std::istream_iterator, std::ostream_iterator and std::copy // CPP-15 : std::istreambuf_iterator, std::ostreambuf_iterator and std::copy // CPP-16 : std::istreambuf_iterator, std::ostreambuf_iterator and std::transform // CPP-17 : std::vector and std::copy // // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn