mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Soumyadip Das Mahapatra <kernelhacker@visualserver.org>
To: Benoit Boissinot <bboissin@gmail.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Harvey Harrison <harvey.harrison@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] bitreversal program
Date: Wed, 21 May 2008 10:54:15 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0805211029250.1736@visualserver.org> (raw)
In-Reply-To: <20080520163912.GP7567@pirzuine>



On Tue, 20 May 2008, Benoit Boissinot wrote:

> A quick benchmarking (that you should have done at least one your
> computer gives for 100000000 iterations):
> old:
> real	0m1.631s
> user	0m1.628s
> sys	0m0.004s
>
> new:
> real	0m5.553s
> user	0m5.540s
> sys	0m0.004s
>
> So I guess there's no need to discuss this further.

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.


  reply	other threads:[~2008-05-21  8:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-19 17:04 Soumyadip Das Mahapatra
2008-05-19 20:42 ` Harvey Harrison
2008-05-20  6:53   ` John Hubbard
2008-05-20 11:01   ` Soumyadip Das Mahapatra
2008-05-20 12:13     ` Akinobu Mita
2008-05-20 15:25       ` Soumyadip Das Mahapatra
2008-05-20 15:47         ` Benoit Boissinot
2008-05-20 15:57           ` Soumyadip Das Mahapatra
2008-05-20 16:39             ` Benoit Boissinot
2008-05-21  8:54               ` Soumyadip Das Mahapatra [this message]
2008-05-21  9:11                 ` Benoit Boissinot
2008-05-21 11:11                 ` Rene Herman
2008-05-21 16:52         ` Tilman Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0805211029250.1736@visualserver.org \
    --to=kernelhacker@visualserver.org \
    --cc=akinobu.mita@gmail.com \
    --cc=bboissin@gmail.com \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®