Re: Copy portions of array



On Thu, 21 Dec 2006 12:34:00 -0600, "wxforecaster"
<wxforecaster@xxxxxxxxx> wrote:

The main byte array is a file being read in, which is discarded afterwards.
The feed to the smaller byte arrays is for processing the byte data in this
binary file. Yes, I need to copy it.

I would stick with the Loop, although I would box it in a Sub or
Function.

When compiled VB is astonishingly fast at dealing with Byte Arrays, I
discovered this when I wrote a Delphi DLL for sorting large files.

I gave the DLL an option to CallBack to VB to perform the comparison,
to my surprize the CallBack version was as fast as the Delphi version,
and Delphi is hard to beat even using ASM

Of course you could use CopyMemory, but if you do, I would box it up
carefully.
.



Relevant Pages

  • Re: binary file
    ... a text file and converting the text data obtained into a binary file. ... You've declared two arrays, each of which has only one element. ... you can pass them to fwrite. ...
    (comp.lang.c)
  • Re: How to make Delphi code quicker
    ... is simply no way to speed up Delphi code without ... you can get a lower time complexity by allowing a higher memory complexity. ... If you are working with arrays: use helper arrays, one dimension smaller, for caching. ... Don't address the same array element over and over again, instead push it in a variable. ...
    (borland.public.delphi.language.basm)
  • Re: IP Level Encryption
    ... wasn't my point that you should avoid C and use Delphi ... than in C with its string type and dynamic arrays. ... Judging by a lot of code out there, fixed-length arrays are common ... strings (as in an array of chars, not the string type) are quite rare unless ...
    (sci.crypt)
  • Re: How to read binary data into a STRUCT?
    ... Dennis JD Myrén ... > I'm trying to figure out how to read a formatted binary file into a ... > in the structure definition. ... The above example is using arrays in the STRUCT definition. ...
    (microsoft.public.dotnet.general)
  • Re: Safe pointer arithmetic and typecasts :D
    ... >> I always wondered how to do safe pointer aritmetic in delphi without ... > There is no really safe method of doing pointer arithmatic in any ... > turned on the program is going to catch any invalid indexes. ... Using arrays and indices instead would make it even more difficult. ...
    (alt.comp.lang.borland-delphi)