Re: Byte Array Speed

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dmitriy Antonov (dantonov_at_netsynergy.com.NOT_FOR_SPAM)
Date: 04/29/04


Date: Thu, 29 Apr 2004 12:11:54 -0400

In this case byte array is used to retrieve information from the file and
the dump it back. I am not sure that using of Long instead of Byte could
speed up the process in this case.

But more important for me, how I could substitute Byte array with Long array
at all. Direct replacement of declarations obviously will not work. That's
why I ask you for example. In other words, how can I read information from
the file into array of Long values and then put it back into file?

Dmitriy.

"Jim Carlock" <anonymous@127.0.0.1> wrote in message
news:eHLuFHgLEHA.3216@TK2MSFTNGP12.phx.gbl...
> I noticed you were using a byte array to write the information
> to a file. 32 bit processors are supposed to be a little quicker
> when using 32 bit values rather than 8 bit values. So instead
> of using the byte array, just change it to a long array.
>
> I've been under the impression that using Longs (32-bit) for
> loop processes is quicker than using Integers (16-bit).
>
> --
> Jim Carlock
> http://www.microcosmotalk.com/
> Post replies to the newsgroup.
>
>
> "Dmitriy Antonov" <dantonov@netsynergy.com.NOT_FOR_SPAM> wrote in message
> news:uG2aqmfLEHA.1340@TK2MSFTNGP12.phx.gbl...
>
> "Jim Carlock" <anonymous@127.0.0.1> wrote in message
> news:e1iFW9aLEHA.1392@TK2MSFTNGP09.phx.gbl...
> > I'm thinking working with Longs instead of bytes would
> > end up being a little faster.
>
>
> I'm not sure I understand how it can be accomplished. Could you provide an
> example?
>
> Thank you,
> Dmitriy
>
>
>



Relevant Pages

  • Re: <ctype.h> toLower()
    ... > No the strlen in the loop is not an example that has been made efficient. ... > It's not quicker to run on every implementation, maybe it is if a lookup ... > array is used but then your incurring the overhead of the array. ... > No it doesn't rely on anything imagine it is part of a windows program. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Array and resize
    ... I will check whether this is also a quicker way to create such a matrix ... >> You are not creating a 2D array, but an array containing arrays, and you ... >> can't drop these onto a worksheet in this way. ... >>> Sub DumpValues() ...
    (microsoft.public.excel.programming)
  • Re: Byte Array Speed
    ... I noticed you were using a byte array to write the information ... loop processes is quicker than using Integers. ... > I'm thinking working with Longs instead of bytes would ...
    (microsoft.public.vb.general.discussion)
  • Re: [PHP] Better way to store data in memory?
    ... Having to do some complex per pixel manipulation, ... way of storing the pixel data than in an array? ... I was looking at the Shared Memory functions, ... but I doubt that would be much quicker. ...
    (php.general)
  • Re: Heres a Python-like range() for JavaScript. Is it new?
    ... for (i in array) ... and no slower for small ones". ... I think this is worth investigating. ... Well, as I recall, it is quicker in Python, because the test and increment are done by native methods rather than using interpreted code. ...
    (comp.lang.javascript)