Re: [PATCH 1/2] bitreversal program

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Benoit Boissinot <bboissin@...>
Cc: Akinobu Mita <akinobu.mita@...>, Harvey Harrison <harvey.harrison@...>, <linux-kernel@...>
Date: Wednesday, May 21, 2008 - 4:54 am

On Tue, 20 May 2008, Benoit Boissinot wrote:


Sorry to disturb you again. But i tested my code against Akinobu's one
and the test result shows my code takes less cpu time than that of
Akinobu's.
Here is the code i used to determine performance
--
#include<stdio.h>
#include<time.h>

int main()
{
 	int i = 100000000;
 	printf("%ld\n", (long)clock());
 	for(; i>0; i--) {
 		bitrev32(0x00face32);
 	}
 	printf("%ld", (long)clock());
}
--
OUTPUT:
[using Akinobu's bitrev32()]
0
6010000

[using my bitrev32()]
0
3990000

And using bitrev8() instead of bitrev32() the result gives the output
like this:
[using Akinobu's bitrev8()]
0
770000

[using my bitrev8()]
0
2360000

My processor is 1.4 GHz one.
I am not forcing you to review my code( or i've no expectation of
inclusion of it ) but its just a curiousity: what is truth behind
the output.

Regards,
Soumya

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] bitreversal program, Soumyadip Das Mahapatra, (Mon May 19, 1:04 pm)
Re: [PATCH 1/2] bitreversal program, Harvey Harrison, (Mon May 19, 4:42 pm)
Re: [PATCH 1/2] bitreversal program, Soumyadip Das Mahapatra, (Tue May 20, 7:01 am)
Re: [PATCH 1/2] bitreversal program, Akinobu Mita, (Tue May 20, 8:13 am)
Re: [PATCH 1/2] bitreversal program, Soumyadip Das Mahapatra, (Tue May 20, 11:25 am)
Re: [PATCH 1/2] bitreversal program, Tilman Schmidt, (Wed May 21, 12:52 pm)
Re: [PATCH 1/2] bitreversal program, Benoit Boissinot, (Tue May 20, 11:47 am)
Re: [PATCH 1/2] bitreversal program, Soumyadip Das Mahapatra, (Tue May 20, 11:57 am)
Re: [PATCH 1/2] bitreversal program, Benoit Boissinot, (Tue May 20, 12:39 pm)
Re: [PATCH 1/2] bitreversal program, Soumyadip Das Mahapatra, (Wed May 21, 4:54 am)
Re: [PATCH 1/2] bitreversal program, Rene Herman, (Wed May 21, 7:11 am)
Re: [PATCH 1/2] bitreversal program, Benoit Boissinot, (Wed May 21, 5:11 am)
Re: [PATCH 1/2] bitreversal program, John Hubbard, (Tue May 20, 2:53 am)