Re: OT: recommended way of timing two pieces of code in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Feb 2016 17:29:58 +0000 "Patrick O'Callaghan" <pocallaghan@xxxxxxxxx> wrote:

> On Fri, 2016-02-26 at 08:31 -0600, Ranjan Maitra wrote:
> > Hi,
> > 
> > Disclaimer: This is clearly marked OT, with the only connection to
> > this group being the fact that I am running F23 on a 20-core Dell
> > T5810 @3.1 GHz each and 64 GiB memory. My OT queries over the past 13
> > years (almost) here have elicited great wealth of information so I am
> > posing here.
> > 
> > So, I am trying to compare two kinds of methods in a C program. Both
> > are written as efficiently as possible (assumed because no point
> > otherwise). I would like to know which of these is more efficient. I
> > have been using get_rusage but I was wondering whether there is a
> > better way?
> 
> I don't claim to be an expert but at first glance I wonder if you've
> defined what you mean by efficiency. Execution time? Program size?
> Memory locality (affects virtual memory performance) etc.

I responded to this on another thread, but I am interested in the amount of time taken by a program in executing a set of instructions. If that includes memory allocation, etc, then fine. 


> You might want to read some of the extensive literature on
> benchmarking.

I have found the literature extremely confusing and unclear.

> 
> > Separately, is there a way to get the number of floating point
> > instructions in C? Both FLOPS and MIPS? 
> 
> Instructions executed on every code path? On the most likely code path?
> 
> Remember: MIPS = Meaningless Indicator of the Performance of Systems.
> 

OK, is there a way to calculate the FLOP instructions in C?

Many thanks and best wishes,
Ranjan

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux