Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Xscale - block copy



hi,

  my boss is a high level guy who never saw a line of assembler in his
life. We have to speed up our code somehow and he thinks he can
optimize buffer passing.

Basically, we are an OSI protocol stack. The process at the top
allocates a structure with some data and a buffer; he passes it to the
next process who copies that into another structure, adds some more
data and pesses it to the next process who ... ditto.

It is possible that some of these processes may, possibly, manipulate
the data buffer somewhat, but generally it is passed thru
transparently.

Now, he wants to pass pointers instead of the structure with the
buffer, despite the fact that I try to tell him that that the compiler
will do that anyway (it's not going to push a 2k buffer onto the
stack).

He may be right that if I have the following (in Ada, sorry)

procedure Main is

type buffer is array (1..1000) of integer;

type As is record
  x: integer;
  buf: buffer;
end record;

type Bs is record
  y: integer;
  x: integer;
  buf: buffer;
end record;

  a: As;
  b: Bs;

BEGIN
-- don't bother to initialize a for this test 
  b := (y => 5, x => a.x, buf => a.buf);
END MAIN;


then that b := (y => 5, x => a.x, buf => a.buf);  does actually block
copy the buf from a to b.  But can anyone tell me how many clock
cycles this would take?

It is my contention that it is negligible and that there are many
better places for us to optimize code, but unless I can prove it by
rewriting the code, which could take weeks, I am stuck.

Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelp!!!

Thanks in advance.



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.