DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Issues on prefetch function
@ 2013-09-29  6:03 Jim Jia
  0 siblings, 0 replies; only message in thread
From: Jim Jia @ 2013-09-29  6:03 UTC (permalink / raw)
  To: dev

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;
}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-29  6:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-29  6:03 [dpdk-dev] Issues on prefetch function Jim Jia

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).