LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2013, 09:12 AM   #1
sumegha13
LQ Newbie
 
Registered: Sep 2013
Posts: 14

Rep: Reputation: Disabled
Time of mathematic operation


How to find time of mathematic operation in linux??? and NS2 ?
ex:
char a[12]="72bfvmdn";
char b[23]="mfsjh"
char c[45]="";

how to find time of the below operation:
c[45]=a^b(XOR) operation
 
Old 09-19-2013, 11:01 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 981
Blog Entries: 2

Rep: Reputation: 235Reputation: 235Reputation: 235
Normally for short code fragments I'd suggest:
gcc -S to get assembly code
look up each item of assembly code to discover the number of clock cycles
correct for any pipelining
convert cycles to time using the CPU speed

but in this case check for bugs in the code first.
 
2 members found this post helpful.
Old 09-19-2013, 11:33 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,483

Rep: Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232
# 11 . http://www.linuxquestions.org/questi...-a-4175476162/


http://en.wikipedia.org/wiki/Equation_of_time
""The equation of time describes the discrepancy
between two kinds of solar time.""

Probably not what you mean.
Please use some other words to describe what it is you want.
May be use an example ..

EDIT : Seems the question was changed.
And the original "#11" was moved to a new thread.

-

Last edited by knudfl; 09-19-2013 at 02:55 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fclose() operation takes very long time to execute on ext4 file system rudreshsm Linux - Kernel 4 09-13-2012 08:31 AM
"How to display string @ row,column? How to time a 'sorting' operation?" ankur007 Linux - Newbie 4 08-14-2010 06:59 PM
Matlab/Mathematic/Maple for linux? cmfarley19 Linux - Software 5 08-10-2005 02:59 PM
I need Mathematic programs for Linux phoenix_wolf Linux - Software 1 12-28-2004 08:17 PM
Can I somehow accurately measure the time a operation takes? Like 'unzip -x foo.zip'? brynjarh Linux - Newbie 9 08-18-2004 09:26 PM


All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration