From: "Jim Jia" <mydpdk-KN7UnAbNpbg@public.gmane.org>
To: "dev-VfR2kkLFssw@public.gmane.org" <dev-VfR2kkLFssw@public.gmane.org>
Subject: Issues on prefetch function
Date: Sun, 29 Sep 2013 14:03:44 +0800 (CST) [thread overview]
Message-ID: <3dd718cf.53bc.1416850bf49.Coremail.mydpdk@126.com> (raw)
Hello, everyone
I'm doing an experiment to test the performance of rte_prefetch0. I find the speed of that function is quit slow. When executing the following code, tit will take about 8,000,000 cycles (about 45 cycles each loop ). What's wrong with it?
Thanks in advance.
struct A
{
char a[64];
};
struct A foo[180000];
int
main ()
{
int i, j;
long long a = rte_rdtsc ();
for (j = 0; j < 180000; j++)
{
rte_prefetcht0 (&foo[j]);
}
long long b = rte_rdtsc ();
printf ("%lld\n", b - a);
return 0;
}
reply other threads:[~2013-09-29 6:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3dd718cf.53bc.1416850bf49.Coremail.mydpdk@126.com \
--to=mydpdk-kn7unabnpbg@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.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;
as well as URLs for NNTP newsgroup(s).