Home All Groups Group Topic Archive Search About
Author
7 May 2006 8:21 PM
PJ6
I'm looking for a way to increase performance on a few rather simple integer
array operations, such as adding the values of one to another. I know I can
do this procedurally, but was wondering if there wasn't some sort of "mass"
operation that would be faster, and can be done in one command. Is there?

Paul

Author
8 May 2006 6:05 AM
Cor Ligthert [MVP]
PJ6,

Be aware that the 8086 processor familly and descents have a small set of
instructions, this means that your mass operation will still be a lot of
processing. Therefore look how values are stored and you are halfway your
question. Avoid boxing, avoid fixed arrays.

By instance this seems a clever instruction using late binding
dim c as integer = 10
dim d as decimal = 10
dim c as double =  myadder(b, c)
c = myadder(c, a)

public function myadder(byval b as object, c as object) as object
return b + c
end sub

However it is not, it cost very much processor cycles

Cor



Show quoteHide quote
"PJ6" <no***@nowhere.net> schreef in bericht
news:ujezUPhcGHA.1856@TK2MSFTNGP03.phx.gbl...
> I'm looking for a way to increase performance on a few rather simple
> integer
> array operations, such as adding the values of one to another. I know I
> can
> do this procedurally, but was wondering if there wasn't some sort of
> "mass"
> operation that would be faster, and can be done in one command. Is there?
>
> Paul
>
>
>
Author
8 May 2006 1:27 PM
PJ6
Very well, but I also know that there are "bitblt" operations that are
(supposedly) insanely fast with large amounts of data, this is what I was
after.

Some of what I'm doing can be performed with Matrix operations, but I don't
really know if that is any faster than a vanilla interative procedure,
either.

Paul

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uX$jnUmcGHA.5116@TK2MSFTNGP04.phx.gbl...
> PJ6,
>
> Be aware that the 8086 processor familly and descents have a small set of
> instructions, this means that your mass operation will still be a lot of
> processing. Therefore look how values are stored and you are halfway your
> question. Avoid boxing, avoid fixed arrays.
>
> By instance this seems a clever instruction using late binding
> dim c as integer = 10
> dim d as decimal = 10
> dim c as double =  myadder(b, c)
> c = myadder(c, a)
>
> public function myadder(byval b as object, c as object) as object
> return b + c
> end sub
>
> However it is not, it cost very much processor cycles
>
> Cor
>
>
>
> "PJ6" <no***@nowhere.net> schreef in bericht
> news:ujezUPhcGHA.1856@TK2MSFTNGP03.phx.gbl...
>> I'm looking for a way to increase performance on a few rather simple
>> integer
>> array operations, such as adding the values of one to another. I know I
>> can
>> do this procedurally, but was wondering if there wasn't some sort of
>> "mass"
>> operation that would be faster, and can be done in one command. Is there?
>>
>> Paul
>>
>>
>>
>
>
Author
9 May 2006 3:31 PM
PJ6
OK I found a better approach...

Storing and operating on partial derivatives (along the y-axis) of the data
reduced the number of required calculations by 1-2 orders of magnitude.

I'm sure if I had been a computer science major this would have been the
first thing to occur to me... but I guess I'm just glad it came to me at
all.

Paul

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uX$jnUmcGHA.5116@TK2MSFTNGP04.phx.gbl...
> PJ6,
>
> Be aware that the 8086 processor familly and descents have a small set of
> instructions, this means that your mass operation will still be a lot of
> processing. Therefore look how values are stored and you are halfway your
> question. Avoid boxing, avoid fixed arrays.
>
> By instance this seems a clever instruction using late binding
> dim c as integer = 10
> dim d as decimal = 10
> dim c as double =  myadder(b, c)
> c = myadder(c, a)
>
> public function myadder(byval b as object, c as object) as object
> return b + c
> end sub
>
> However it is not, it cost very much processor cycles
>
> Cor
>
>
>
> "PJ6" <no***@nowhere.net> schreef in bericht
> news:ujezUPhcGHA.1856@TK2MSFTNGP03.phx.gbl...
>> I'm looking for a way to increase performance on a few rather simple
>> integer
>> array operations, such as adding the values of one to another. I know I
>> can
>> do this procedurally, but was wondering if there wasn't some sort of
>> "mass"
>> operation that would be faster, and can be done in one command. Is there?
>>
>> Paul
>>
>>
>>
>
>